deploy: fa43658923
This commit is contained in:
parent
24320ce196
commit
0712b98853
300 changed files with 285183 additions and 269040 deletions
|
|
@ -1 +1 @@
|
|||
58613dbed8a7cd819d2957eb963cf811
|
||||
7a30995e47871baf0dd272594f4b8c21
|
||||
Binary file not shown.
|
|
@ -38,6 +38,6 @@ _flutter.buildConfig = {"engineRevision":"a5cb96369ef86c7e85abf5d662a1ca5d897750
|
|||
|
||||
_flutter.loader.load({
|
||||
serviceWorkerSettings: {
|
||||
serviceWorkerVersion: "1575879192"
|
||||
serviceWorkerVersion: "2387586430"
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ const RESOURCES = {"flutter.js": "24bc71911b75b5f8135c949e27a2984e",
|
|||
"main.dart.js_274.part.js": "77709b3dff2da4f7b6743ae00a602005",
|
||||
"main.dart.js_318.part.js": "d50b942d2c0bc46ac529690c1d216447",
|
||||
"main.dart.js_338.part.js": "7f17d9183bbf5b98d6160a581e01e752",
|
||||
"index.html": "3c55b58a8d693c5b480e0ec209b1db45",
|
||||
"/": "3c55b58a8d693c5b480e0ec209b1db45",
|
||||
"index.html": "185d9214a6fc3ea2aadcd9a973a7b8b6",
|
||||
"/": "185d9214a6fc3ea2aadcd9a973a7b8b6",
|
||||
"auth.html": "88530dca48290678d3ce28a34fc66cbd",
|
||||
"main.dart.js_327.part.js": "3235f028ba76c69932869d4a9836b386",
|
||||
"main.dart.js_305.part.js": "cf794c6e01de95d62afe99c92d06008d",
|
||||
|
|
@ -44,7 +44,7 @@ const RESOURCES = {"flutter.js": "24bc71911b75b5f8135c949e27a2984e",
|
|||
"assets/shaders/stretch_effect.frag": "40d68efbbf360632f614c731219e95f0",
|
||||
"assets/shaders/ink_sparkle.frag": "ecc85a2e95f5e9f53123dcaf8cb9b6ce",
|
||||
"assets/AssetManifest.bin.json": "6903af015855cc6fe860ba6a9b1603fa",
|
||||
"assets/assets/vodozemac/vodozemac_bindings_dart_bg.wasm": "c17af0850a1b9e3fa29e6dc285cbbe31",
|
||||
"assets/assets/vodozemac/vodozemac_bindings_dart_bg.wasm": "c2375b58ae6de76ef7504a03297402dd",
|
||||
"assets/assets/vodozemac/vodozemac_bindings_dart.js": "d8a180a7a69f7559dc198660737f1132",
|
||||
"assets/assets/info-logo.png": "9d1d72596564e6639fd984fea2dfd048",
|
||||
"assets/assets/banner.png": "4a005db27a8787aea061537223dabb7d",
|
||||
|
|
@ -107,7 +107,7 @@ const RESOURCES = {"flutter.js": "24bc71911b75b5f8135c949e27a2984e",
|
|||
"main.dart.js_328.part.js": "b445f7a5efac7a13d7a1f7e73bb7213b",
|
||||
"main.dart.js_289.part.js": "09571ae02604b643b49a62ece0982beb",
|
||||
"main.dart.js_337.part.js": "4a9dd9f5c7a0c6301ef0446e64e95c37",
|
||||
"flutter_bootstrap.js": "c2c83656c4ecf378d6832c07176a22b5",
|
||||
"flutter_bootstrap.js": "a28efc83e47bf0ce4a51dc5786372c67",
|
||||
"main.dart.js_315.part.js": "acccf71d49c71c9500791e3d9e6546d0",
|
||||
"main.dart.js_306.part.js": "b7b522b0cfa028c0b1f0c9335086d187",
|
||||
"version.json": "5771dd777ce1bbb76f0db8df8a12f754",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
This is a placeholder for base href that will be replaced by the value of
|
||||
the `--base-href` argument provided to `flutter build`.
|
||||
-->
|
||||
<base href="/nightly/">
|
||||
<base href="/web/">
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||
|
|
@ -83,7 +83,7 @@ _flutter.buildConfig = {"engineRevision":"a5cb96369ef86c7e85abf5d662a1ca5d897750
|
|||
|
||||
_flutter.loader.load({
|
||||
serviceWorker: {
|
||||
serviceWorkerVersion: "1575879192",
|
||||
serviceWorkerVersion: "2387586430",
|
||||
},
|
||||
onEntrypointLoaded: function (engineInitializer) {
|
||||
engineInitializer.initializeEngine({ useColorEmoji: true }).then(function (appRunner) {
|
||||
|
|
|
|||
18
node_modules/.bin/detect-libc
generated
vendored
18
node_modules/.bin/detect-libc
generated
vendored
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
var spawnSync = require('child_process').spawnSync;
|
||||
var libc = require('../');
|
||||
|
||||
var spawnOptions = {
|
||||
env: process.env,
|
||||
shell: true,
|
||||
stdio: 'inherit'
|
||||
};
|
||||
|
||||
if (libc.isNonGlibcLinux) {
|
||||
spawnOptions.env.LIBC = process.env.LIBC || libc.family;
|
||||
}
|
||||
|
||||
process.exit(spawnSync(process.argv[2], process.argv.slice(3), spawnOptions).status);
|
||||
10
node_modules/.bin/tailwindcss
generated
vendored
10
node_modules/.bin/tailwindcss
generated
vendored
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env node
|
||||
var se=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),le=e=>{throw TypeError(e)};var q=(e,t,n)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&le("Object expected");var i,o;n&&(i=t[se("asyncDispose")]),i===void 0&&(i=t[se("dispose")],n&&(o=i)),typeof i!="function"&&le("Object not disposable"),o&&(i=function(){try{o.call(this)}catch(r){return Promise.reject(r)}}),e.push([n,i,t])}else n&&e.push([n]);return t},K=(e,t,n)=>{var i=typeof SuppressedError=="function"?SuppressedError:function(u,s,l,p){return p=Error(l),p.name="SuppressedError",p.error=u,p.suppressed=s,p},o=u=>t=n?new i(u,t,"An error was suppressed during disposal"):(n=!0,u),r=u=>{for(;u=e.pop();)try{var s=u[1]&&u[1].call(u[2]);if(u[0])return Promise.resolve(s).then(r,l=>(o(l),r()))}catch(l){o(l)}if(n)throw t};return r()};import Ae from"mri";function ue(e,t=process.argv.slice(2)){for(let[o,r]of t.entries())r==="-"&&(t[o]="__IO_DEFAULT_VALUE__");let n=Ae(t);for(let o in n)n[o]==="__IO_DEFAULT_VALUE__"&&(n[o]="-");let i={_:n._};for(let[o,{type:r,alias:u,default:s=r==="boolean"?!1:null}]of Object.entries(e)){if(i[o]=s,u){let l=u.slice(1);n[l]!==void 0&&(i[o]=ae(n[l],r))}{let l=o.slice(2);n[l]!==void 0&&(i[o]=ae(n[l],r))}}return i}function ae(e,t){switch(t){case"string":return z(e);case"boolean":return O(e);case"number":return R(e);case"boolean | string":return O(e)??z(e);case"number | string":return R(e)??z(e);case"boolean | number":return O(e)??R(e);case"boolean | number | string":return O(e)??R(e)??z(e);default:throw new Error(`Unhandled type: ${t}`)}}function O(e){if(e===!0||e===!1)return e;if(e==="true")return!0;if(e==="false")return!1}function R(e){if(typeof e=="number")return e;{let t=Number(e);if(!Number.isNaN(t))return t}}function z(e){return`${e}`}import We from"@parcel/watcher";import{compile as Ee,env as Ue,Instrumentation as me,optimize as Pe,toSourceMap as he}from"@tailwindcss/node";import{clearRequireCache as Le}from"@tailwindcss/node/require-cache";import{Scanner as je}from"@tailwindcss/oxide";import{existsSync as Ie}from"fs";import X from"fs/promises";import C from"path";var k=class{#e=new Set([]);queueMacrotask(t){let n=setTimeout(t,0);return this.add(()=>{clearTimeout(n)})}add(t){return this.#e.add(t),()=>{this.#e.delete(t),t()}}async dispose(){for(let t of this.#e)await t();this.#e.clear()}};import Re from"fs";import de from"path";import{stripVTControlCharacters as ze}from"util";import w from"picocolors";import pe from"enhanced-resolve";import Me from"fs";import{createRequire as Be}from"module";var Oe=Be(import.meta.url).resolve;function ce(e){if(typeof globalThis.__tw_resolve=="function"){let t=globalThis.__tw_resolve(e);if(t)return t}return Oe(e)}var Xe=pe.ResolverFactory.createResolver({fileSystem:new pe.CachedInputFileSystem(Me,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});function fe(e){let t=typeof e=="number"?BigInt(e):e;return t<1000n?`${t}ns`:(t/=1000n,t<1000n?`${t}\xB5s`:(t/=1000n,t<1000n?`${t}ms`:(t/=1000n,t<60n?`${t}s`:(t/=60n,t<60n?`${t}m`:(t/=60n,t<24n?`${t}h`:(t/=24n,`${t}d`))))))}var D={indent:2};function N(){return`${w.italic(w.bold(w.blue("\u2248")))} tailwindcss ${w.blue(`v${De()}`)}`}function F(e){return`${w.dim(w.blue("`"))}${w.blue(e)}${w.dim(w.blue("`"))}`}function W(e,t=process.cwd(),{preferAbsoluteIfShorter:n=!0}={}){let i=de.relative(t,e);return i.startsWith("..")||(i=`.${de.sep}${i}`),n&&i.length>e.length?e:i}function G(e,t){let n=e.split(" "),i=[],o="",r=0;for(let u of n){let s=ze(u).length;r+s+1>t&&(i.push(o),o="",r=0),o+=(r?" ":"")+u,r+=s+(r?1:0)}return r&&i.push(o),i}function E(e){let t=fe(e);return e<=50*1e6?w.green(t):e<=300*1e6?w.blue(t):e<=1e3*1e6?w.yellow(t):w.red(t)}function A(e,t=0){return`${" ".repeat(t+D.indent)}${e}`}function x(e=""){process.stderr.write(`${e}
|
||||
var le=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ae=e=>{throw TypeError(e)};var G=(e,t,i)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&ae("Object expected");var r,o;i&&(r=t[le("asyncDispose")]),r===void 0&&(r=t[le("dispose")],i&&(o=r)),typeof r!="function"&&ae("Object not disposable"),o&&(r=function(){try{o.call(this)}catch(n){return Promise.reject(n)}}),e.push([i,r,t])}else i&&e.push([i]);return t},J=(e,t,i)=>{var r=typeof SuppressedError=="function"?SuppressedError:function(u,s,l,p){return p=Error(l),p.name="SuppressedError",p.error=u,p.suppressed=s,p},o=u=>t=i?new r(u,t,"An error was suppressed during disposal"):(i=!0,u),n=u=>{for(;u=e.pop();)try{var s=u[1]&&u[1].call(u[2]);if(u[0])return Promise.resolve(s).then(n,l=>(o(l),n()))}catch(l){o(l)}if(i)throw t};return n()};import ke from"mri";function pe(e,t=process.argv.slice(2)){for(let[o,n]of t.entries())n==="-"&&(t[o]="__IO_DEFAULT_VALUE__");let i=ke(t);for(let o in i){let n=i[o];o!=="_"&&Array.isArray(n)&&(n=n[n.length-1]),n==="__IO_DEFAULT_VALUE__"&&(n="-"),i[o]=n}let r={_:i._};for(let[o,{type:n,alias:u,default:s=n==="boolean"?!1:null}]of Object.entries(e)){if(r[o]=s,u){let l=u.slice(1);i[l]!==void 0&&(r[o]=ue(i[l],n))}{let l=o.slice(2);i[l]!==void 0&&(r[o]=ue(i[l],n))}}return r}function ue(e,t){switch(t){case"string":return D(e);case"boolean":return O(e);case"number":return R(e);case"boolean | string":return O(e)??D(e);case"number | string":return R(e)??D(e);case"boolean | number":return O(e)??R(e);case"boolean | number | string":return O(e)??R(e)??D(e);default:throw new Error(`Unhandled type: ${t}`)}}function O(e){if(e===!0||e===!1)return e;if(e==="true")return!0;if(e==="false")return!1}function R(e){if(typeof e=="number")return e;{let t=Number(e);if(!Number.isNaN(t))return t}}function D(e){return`${e}`}import We from"@parcel/watcher";import{compile as Ee,env as Ue,Instrumentation as he,optimize as Pe,toSourceMap as P}from"@tailwindcss/node";import{clearRequireCache as Ie}from"@tailwindcss/node/require-cache";import{Scanner as Le}from"@tailwindcss/oxide";import{existsSync as je}from"fs";import Z from"fs/promises";import C from"path";var A=class{#e=new Set([]);queueMacrotask(t){let i=setTimeout(t,0);return this.add(()=>{clearTimeout(i)})}add(t){return this.#e.add(t),()=>{this.#e.delete(t),t()}}async dispose(){for(let t of this.#e)await t();this.#e.clear()}};import Re from"fs";import me from"path";import{stripVTControlCharacters as De}from"util";import w from"picocolors";import ce from"enhanced-resolve";import Me from"fs";import{createRequire as Be}from"module";var Oe=Be(import.meta.url).resolve;function fe(e){if(typeof globalThis.__tw_resolve=="function"){let t=globalThis.__tw_resolve(e);if(t)return t}return Oe(e)}var Xe=ce.ResolverFactory.createResolver({fileSystem:new ce.CachedInputFileSystem(Me,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});function de(e){let t=typeof e=="number"?BigInt(e):e;return t<1000n?`${t}ns`:(t/=1000n,t<1000n?`${t}\xB5s`:(t/=1000n,t<1000n?`${t}ms`:(t/=1000n,t<60n?`${t}s`:(t/=60n,t<60n?`${t}m`:(t/=60n,t<24n?`${t}h`:(t/=24n,`${t}d`))))))}var z={indent:2};function N(){return`${w.italic(w.bold(w.blue("\u2248")))} tailwindcss ${w.blue(`v${ze()}`)}`}function F(e){return`${w.dim(w.blue("`"))}${w.blue(e)}${w.dim(w.blue("`"))}`}function W(e,t=process.cwd(),{preferAbsoluteIfShorter:i=!0}={}){let r=me.relative(t,e);return r.startsWith("..")||(r=`.${me.sep}${r}`),i&&r.length>e.length?e:r}function Q(e,t){let i=e.split(" "),r=[],o="",n=0;for(let u of i){let s=De(u).length;n+s+1>t&&(r.push(o),o="",n=0),o+=(n?" ":"")+u,n+=s+(n?1:0)}return n&&r.push(o),r}function E(e){let t=de(e);return e<=50*1e6?w.green(t):e<=300*1e6?w.blue(t):e<=1e3*1e6?w.yellow(t):w.red(t)}function k(e,t=0){return`${" ".repeat(t+z.indent)}${e}`}function x(e=""){process.stderr.write(`${e}
|
||||
`)}function h(e=""){process.stdout.write(`${e}
|
||||
`)}function De(){if(typeof globalThis.__tw_version=="string")return globalThis.__tw_version;let{version:e}=JSON.parse(Re.readFileSync(ce("tailwindcss/package.json"),"utf-8"));return e}import J from"fs/promises";import Ne from"path";function Q(){return new Promise((e,t)=>{let n="";process.stdin.on("data",i=>{n+=i}),process.stdin.on("end",()=>e(n)),process.stdin.on("error",i=>t(i))})}async function Y(e,t){try{if(await J.readFile(e,"utf8")===t)return}catch{}await J.mkdir(Ne.dirname(e),{recursive:!0}),await J.writeFile(e,t,"utf8")}var ye=String.raw,a=Ue.DEBUG;function U(){return{"--input":{type:"string",description:"Input file",alias:"-i"},"--output":{type:"string",description:"Output file",alias:"-o",default:"-"},"--watch":{type:"boolean | string",description:"Watch for changes and rebuild as needed, and use `always` to keep watching when stdin is closed",alias:"-w",values:["always"]},"--minify":{type:"boolean",description:"Optimize and minify the output",alias:"-m"},"--optimize":{type:"boolean",description:"Optimize the output without minifying"},"--cwd":{type:"string",description:"The current working directory",default:"."},"--map":{type:"boolean | string",description:"Generate a source map",default:!1}}}async function H(e){try{return await e()}catch(t){t instanceof Error&&x(t.toString()),process.exit(1)}}async function ge(e){var ne=[];try{x(N());x();let t=q(ne,new me);a&&t.start("[@tailwindcss/cli] (initial build)");let n=C.resolve(e["--cwd"]);e["--output"]&&e["--output"]!=="-"&&(e["--output"]=C.resolve(n,e["--output"]));e["--input"]&&e["--input"]!=="-"&&(e["--input"]=C.resolve(n,e["--input"]),Ie(e["--input"])||(x(`Specified input file ${F(W(e["--input"]))} does not exist.`),process.exit(1)));e["--input"]===e["--output"]&&e["--input"]!=="-"&&(x(`Specified input file ${F(W(e["--input"]))} and output file ${F(W(e["--output"]))} are identical.`),process.exit(1));e["--map"]==="-"&&(x("Use --map without a value to inline the source map"),process.exit(1));e["--map"]&&e["--map"]!==!0&&(e["--map"]=C.resolve(n,e["--map"]));let i=process.hrtime.bigint();let o=e["--input"]?e["--input"]==="-"?await Q():await X.readFile(e["--input"],"utf-8"):ye`
|
||||
`)}function ze(){if(typeof globalThis.__tw_version=="string")return globalThis.__tw_version;let{version:e}=JSON.parse(Re.readFileSync(fe("tailwindcss/package.json"),"utf-8"));return e}import U from"fs/promises";import Ne from"path";function Y(){return new Promise((e,t)=>{let i="";process.stdin.on("data",r=>{i+=r}),process.stdin.on("end",()=>e(i)),process.stdin.on("error",r=>t(r))})}async function H(e,t){if(!await U.stat(e).then(r=>r.isCharacterDevice()||r.isFIFO()).catch(()=>!1))try{if(await U.readFile(e,"utf8")===t)return}catch{}await U.mkdir(Ne.dirname(e),{recursive:!0}),await U.writeFile(e,t,"utf8")}var ye=String.raw,a=Ue.DEBUG;function I(){return{"--input":{type:"string",description:"Input file",alias:"-i"},"--output":{type:"string",description:"Output file",alias:"-o",default:"-"},"--watch":{type:"boolean | string",description:"Watch for changes and rebuild as needed, and use `always` to keep watching when stdin is closed",alias:"-w",values:["always"]},"--minify":{type:"boolean",description:"Optimize and minify the output",alias:"-m"},"--optimize":{type:"boolean",description:"Optimize the output without minifying"},"--cwd":{type:"string",description:"The current working directory",default:"."},"--map":{type:"boolean | string",description:"Generate a source map",default:!1}}}async function X(e){try{return await e()}catch(t){t instanceof Error&&x(t.toString()),process.exit(1)}}async function ge(e){var ie=[];try{x(N());x();let t=G(ie,new he);a&&t.start("[@tailwindcss/cli] (initial build)");let i=C.resolve(e["--cwd"]);e["--output"]&&e["--output"]!=="-"&&(e["--output"]=C.resolve(i,e["--output"]));e["--input"]&&e["--input"]!=="-"&&(e["--input"]=C.resolve(i,e["--input"]),je(e["--input"])||(x(`Specified input file ${F(W(e["--input"]))} does not exist.`),process.exit(1)));e["--input"]===e["--output"]&&e["--input"]!=="-"&&(x(`Specified input file ${F(W(e["--input"]))} and output file ${F(W(e["--output"]))} are identical.`),process.exit(1));e["--map"]==="-"&&(x("Use --map without a value to inline the source map"),process.exit(1));e["--map"]&&e["--map"]!==!0&&(e["--map"]=C.resolve(i,e["--map"]));let r=process.hrtime.bigint();let o=e["--input"]?e["--input"]==="-"?await Y():await Z.readFile(e["--input"],"utf-8"):ye`
|
||||
@import 'tailwindcss';
|
||||
`;let r={css:"",optimizedCss:""};async function u(g,b,f,S){let $=g;if(f["--minify"]||f["--optimize"])if(g!==r.css){a&&S.start("Optimize CSS");let T=Pe(g,{file:f["--input"]??"input.css",minify:f["--minify"]??!1,map:b?.raw??void 0});a&&S.end("Optimize CSS"),r.css=g,r.optimizedCss=T.code,T.map&&(b=he(T.map)),$=T.code}else $=r.optimizedCss;b&&(f["--map"]===!0?($+=`
|
||||
`,$+=b.inline):typeof f["--map"]=="string"&&(a&&S.start("Write source map"),await Y(f["--map"],b.raw),a&&S.end("Write source map"))),a&&S.start("Write output"),f["--output"]&&f["--output"]!=="-"?await Y(f["--output"],$):h($),a&&S.end("Write output")}let s=e["--input"]&&e["--input"]!=="-"?C.resolve(e["--input"]):null;let l=s?C.dirname(s):process.cwd();let p=s?[s]:[];async function m(g,b){a&&b.start("Setup compiler");let f=await Ee(g,{from:e["--output"]?s??"stdin.css":void 0,base:l,onDependency(T){p.push(T)}}),S=(f.root==="none"?[]:f.root===null?[{base:n,pattern:"**/*",negated:!1}]:[{...f.root,negated:!1}]).concat(f.sources),$=new je({sources:S});return a&&b.end("Setup compiler"),[f,$]}let[d,y]=await H(()=>m(o,t));if(e["--watch"]){let g=[];g.push(await we(be(y),async function b(f){try{var S=[];try{if(f.length===1&&f[0]===e["--output"])return;let c=q(S,new me);a&&c.start("[@tailwindcss/cli] (watcher)");let ie=process.hrtime.bigint();let re=[];let L="incremental";let oe=p;for(let _ of f){if(oe.includes(_)){L="full";break}re.push({file:_,extension:C.extname(_).slice(1)})}let j="";let I=null;if(L==="full"){let _=e["--input"]?e["--input"]==="-"?await Q():await X.readFile(e["--input"],"utf-8"):ye`
|
||||
`;let n={css:"",optimizedCss:""};async function u(g,b,f,S){let $=g;if(f["--minify"]||f["--optimize"])if(g!==n.css){a&&S.start("Optimize CSS");let T=Pe(g,{file:f["--input"]??"input.css",minify:f["--minify"]??!1,map:b?.raw??void 0});a&&S.end("Optimize CSS"),n.css=g,n.optimizedCss=T.code,T.map&&(b=P(T.map)),$=T.code}else $=n.optimizedCss;b&&(f["--map"]===!0?($+=`
|
||||
`,$+=b.inline):typeof f["--map"]=="string"&&(a&&S.start("Write source map"),await H(f["--map"],b.raw),a&&S.end("Write source map"))),a&&S.start("Write output"),f["--output"]&&f["--output"]!=="-"?await H(f["--output"],$):h($),a&&S.end("Write output")}let s=e["--input"]&&e["--input"]!=="-"?C.resolve(e["--input"]):null;let l=s?C.dirname(s):process.cwd();let p=s?[s]:[];async function m(g,b){a&&b.start("Setup compiler");let f=await Ee(g,{from:e["--output"]?s??"stdin.css":void 0,base:l,onDependency(T){p.push(T)}}),S=(f.root==="none"?[]:f.root===null?[{base:i,pattern:"**/*",negated:!1}]:[{...f.root,negated:!1}]).concat(f.sources),$=new Le({sources:S});return a&&b.end("Setup compiler"),[f,$]}let[d,y]=await X(()=>m(o,t));if(e["--watch"]){let g=[];g.push(await we(be(y),async function b(f){try{var S=[];try{if(f.length===1&&f[0]===e["--output"])return;let c=G(S,new he);a&&c.start("[@tailwindcss/cli] (watcher)");let re=process.hrtime.bigint();let oe=[];let j="incremental";let se=p;for(let _ of f){if(se.includes(_)){j="full";break}oe.push({file:_,extension:C.extname(_).slice(1)})}let V="";let q=null;if(j==="full"){let _=e["--input"]?e["--input"]==="-"?await Y():await Z.readFile(e["--input"],"utf-8"):ye`
|
||||
@import 'tailwindcss';
|
||||
`;Le(oe),p=s?[s]:[],[d,y]=await m(_,c),a&&c.start("Scan for candidates");let V=y.scan();a&&c.end("Scan for candidates"),a&&c.start("Setup new watchers");let Fe=await we(be(y),b);a&&c.end("Setup new watchers"),a&&c.start("Cleanup old watchers"),await Promise.all(g.splice(0).map(ke=>ke())),a&&c.end("Cleanup old watchers"),g.push(Fe),a&&c.start("Build CSS"),j=d.build(V),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),I=d.buildSourceMap(),a&&c.end("Build Source Map"))}else if(L==="incremental"){a&&c.start("Scan for candidates");let _=y.scanFiles(re);if(a&&c.end("Scan for candidates"),_.length<=0){let V=process.hrtime.bigint();x(`Done in ${E(V-ie)}`);return}a&&c.start("Build CSS"),j=d.build(_),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),I=d.buildSourceMap(),a&&c.end("Build Source Map"))}await u(j,I,e,c);let Ce=process.hrtime.bigint();x(`Done in ${E(Ce-ie)}`)}catch($){var T=$,ve=!0}finally{K(S,T,ve)}}catch(c){c instanceof Error&&x(c.toString())}})),e["--watch"]!=="always"&&process.stdin.on("end",()=>{Promise.all(g.map(b=>b())).then(()=>process.exit(0),()=>process.exit(1))}),process.stdin.resume()}a&&t.start("Scan for candidates");let P=y.scan();a&&t.end("Scan for candidates");a&&t.start("Build CSS");let M=await H(()=>d.build(P));a&&t.end("Build CSS");let B=null;e["--map"]&&(a&&t.start("Build Source Map"),B=await H(()=>he(d.buildSourceMap())),a&&t.end("Build Source Map"));await u(M,B,e,t);let xe=process.hrtime.bigint();x(`Done in ${E(xe-i)}`)}catch($e){var Te=$e,_e=!0}finally{K(ne,Te,_e)}}async function we(e,t){e=e.sort((s,l)=>s.length-l.length);let n=[];for(let s=0;s<e.length;++s)for(let l=0;l<s;++l)e[s].startsWith(`${e[l]}/`)&&n.push(e[s]);e=e.filter(s=>!n.includes(s));let i=new k,o=new Set,r=new k;async function u(){await r.dispose(),r.queueMacrotask(()=>{t(Array.from(o)),o.clear()})}for(let s of e){let{unsubscribe:l}=await We.subscribe(s,async(p,m)=>{if(p){console.error(p);return}await Promise.all(m.map(async d=>{if(d.type==="delete")return;let y=null;try{y=await X.lstat(d.path)}catch{}!y?.isFile()&&!y?.isSymbolicLink()||o.add(d.path)})),await u()});i.add(l)}return async()=>{await i.dispose(),await r.dispose()}}function be(e){return[...new Set(e.normalizedSources.flatMap(t=>t.base))]}import v from"picocolors";function Z({invalid:e,usage:t,options:n}){let i=process.stdout.columns;if(h(N()),e&&(h(),h(`${v.dim("Invalid command:")} ${e}`)),t&&t.length>0){h(),h(v.dim("Usage:"));for(let[o,r]of t.entries()){let u=r.slice(0,r.indexOf("[")),s=r.slice(r.indexOf("["));s=s.replace(/\[.*?\]/g,m=>v.dim(m));let p=G(s,i-D.indent-u.length-1);p.length>1&&o!==0&&h(),h(A(`${u}${p.shift()}`));for(let m of p)h(A(m,u.length))}}if(n){let o=0;for(let{alias:l}of Object.values(n))l&&(o=Math.max(o,l.length));let r=[],u=0;for(let[l,{alias:p,values:m}]of Object.entries(n)){m?.length&&(l+=`[=${m.join(", ")}]`);let d=[p&&`${p.padStart(o)}`,p?l:" ".repeat(o+2)+l].filter(Boolean).join(", ");r.push(d),u=Math.max(u,d.length)}h(),h(v.dim("Options:"));let s=8;for(let{description:l,default:p=null}of Object.values(n)){let m=r.shift(),d=s+(u-m.length),y=2,P=i-m.length-d-y-D.indent,M=G(p!==null?`${l} ${v.dim(`[default:\u202F${F(`${p}`)}]`)}`:l,P);h(A(`${v.blue(m)} ${v.dim(v.gray("\xB7")).repeat(d)} ${M.shift()}`));for(let B of M)h(A(`${" ".repeat(m.length+d+y)}${B}`))}}}var ee={"--help":{type:"boolean",description:"Display usage information",alias:"-h"}},te=ue({...U(),...ee}),Se=te._[0];Se&&(Z({invalid:Se,usage:["tailwindcss [options]"],options:{...U(),...ee}}),process.exit(1));(process.stdout.isTTY&&process.argv[2]===void 0||te["--help"])&&(Z({usage:["tailwindcss [--input input.css] [--output output.css] [--watch] [options\u2026]"],options:{...U(),...ee}}),process.exit(0));ge(te);
|
||||
`;Ie(se),p=s?[s]:[],[d,y]=await m(_,c),a&&c.start("Scan for candidates");let K=y.scan();a&&c.end("Scan for candidates"),a&&c.start("Setup new watchers");let Fe=await we(be(y),b);a&&c.end("Setup new watchers"),a&&c.start("Cleanup old watchers"),await Promise.all(g.splice(0).map(Ae=>Ae())),a&&c.end("Cleanup old watchers"),g.push(Fe),a&&c.start("Build CSS"),V=d.build(K),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),q=P(d.buildSourceMap()),a&&c.end("Build Source Map"))}else if(j==="incremental"){a&&c.start("Scan for candidates");let _=y.scanFiles(oe);if(a&&c.end("Scan for candidates"),_.length<=0){let K=process.hrtime.bigint();x(`Done in ${E(K-re)}`);return}a&&c.start("Build CSS"),V=d.build(_),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),q=P(d.buildSourceMap()),a&&c.end("Build Source Map"))}await u(V,q,e,c);let Ce=process.hrtime.bigint();x(`Done in ${E(Ce-re)}`)}catch($){var T=$,ve=!0}finally{J(S,T,ve)}}catch(c){c instanceof Error&&x(c.toString())}})),e["--watch"]!=="always"&&process.stdin.on("end",()=>{Promise.all(g.map(b=>b())).then(()=>process.exit(0),()=>process.exit(1))}),process.stdin.resume()}a&&t.start("Scan for candidates");let L=y.scan();a&&t.end("Scan for candidates");a&&t.start("Build CSS");let M=await X(()=>d.build(L));a&&t.end("Build CSS");let B=null;e["--map"]&&(a&&t.start("Build Source Map"),B=await X(()=>P(d.buildSourceMap())),a&&t.end("Build Source Map"));await u(M,B,e,t);let xe=process.hrtime.bigint();x(`Done in ${E(xe-r)}`)}catch($e){var Te=$e,_e=!0}finally{J(ie,Te,_e)}}async function we(e,t){e=e.sort((s,l)=>s.length-l.length);let i=[];for(let s=0;s<e.length;++s)for(let l=0;l<s;++l)e[s].startsWith(`${e[l]}/`)&&i.push(e[s]);e=e.filter(s=>!i.includes(s));let r=new A,o=new Set,n=new A;async function u(){await n.dispose(),n.queueMacrotask(()=>{t(Array.from(o)),o.clear()})}for(let s of e){let{unsubscribe:l}=await We.subscribe(s,async(p,m)=>{if(p){console.error(p);return}await Promise.all(m.map(async d=>{if(d.type==="delete")return;let y=null;try{y=await Z.lstat(d.path)}catch{}!y?.isFile()&&!y?.isSymbolicLink()||o.add(d.path)})),await u()});r.add(l)}return async()=>{await r.dispose(),await n.dispose()}}function be(e){return[...new Set(e.normalizedSources.flatMap(t=>t.base))]}import v from"picocolors";function ee({invalid:e,usage:t,options:i}){let r=process.stdout.columns;if(h(N()),e&&(h(),h(`${v.dim("Invalid command:")} ${e}`)),t&&t.length>0){h(),h(v.dim("Usage:"));for(let[o,n]of t.entries()){let u=n.slice(0,n.indexOf("[")),s=n.slice(n.indexOf("["));s=s.replace(/\[.*?\]/g,m=>v.dim(m));let p=Q(s,r-z.indent-u.length-1);p.length>1&&o!==0&&h(),h(k(`${u}${p.shift()}`));for(let m of p)h(k(m,u.length))}}if(i){let o=0;for(let{alias:l}of Object.values(i))l&&(o=Math.max(o,l.length));let n=[],u=0;for(let[l,{alias:p,values:m}]of Object.entries(i)){m?.length&&(l+=`[=${m.join(", ")}]`);let d=[p&&`${p.padStart(o)}`,p?l:" ".repeat(o+2)+l].filter(Boolean).join(", ");n.push(d),u=Math.max(u,d.length)}h(),h(v.dim("Options:"));let s=8;for(let{description:l,default:p=null}of Object.values(i)){let m=n.shift(),d=s+(u-m.length),y=2,L=r-m.length-d-y-z.indent,M=Q(p!==null?`${l} ${v.dim(`[default:\u202F${F(`${p}`)}]`)}`:l,L);h(k(`${v.blue(m)} ${v.dim(v.gray("\xB7")).repeat(d)} ${M.shift()}`));for(let B of M)h(k(`${" ".repeat(m.length+d+y)}${B}`))}}}var te={"--help":{type:"boolean",description:"Display usage information",alias:"-h"}},ne=pe({...I(),...te}),Se=ne._[0];Se&&(ee({invalid:Se,usage:["tailwindcss [options]"],options:{...I(),...te}}),process.exit(1));(process.stdout.isTTY&&process.argv[2]===void 0||ne["--help"])&&(ee({usage:["tailwindcss [--input input.css] [--output output.css] [--watch] [options\u2026]"],options:{...I(),...te}}),process.exit(0));ge(ne);
|
||||
|
|
|
|||
200
node_modules/.package-lock.json
generated
vendored
200
node_modules/.package-lock.json
generated
vendored
|
|
@ -49,16 +49,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz",
|
||||
"integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==",
|
||||
"version": "2.5.4",
|
||||
"resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.4.tgz",
|
||||
"integrity": "sha512-WYa2tUVV5HiArWPB3ydlOc4R2ivq0IDrlqhMi3l7mVsFEXNcTfxYFPIHXHXIh/ca/y/V5N4E1zecyxdIBjYnkQ==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"detect-libc": "^1.0.3",
|
||||
"detect-libc": "^2.0.3",
|
||||
"is-glob": "^4.0.3",
|
||||
"micromatch": "^4.0.5",
|
||||
"node-addon-api": "^7.0.0"
|
||||
"node-addon-api": "^7.0.0",
|
||||
"picomatch": "^4.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
|
|
@ -68,25 +68,25 @@
|
|||
"url": "https://opencollective.com/parcel"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@parcel/watcher-android-arm64": "2.5.1",
|
||||
"@parcel/watcher-darwin-arm64": "2.5.1",
|
||||
"@parcel/watcher-darwin-x64": "2.5.1",
|
||||
"@parcel/watcher-freebsd-x64": "2.5.1",
|
||||
"@parcel/watcher-linux-arm-glibc": "2.5.1",
|
||||
"@parcel/watcher-linux-arm-musl": "2.5.1",
|
||||
"@parcel/watcher-linux-arm64-glibc": "2.5.1",
|
||||
"@parcel/watcher-linux-arm64-musl": "2.5.1",
|
||||
"@parcel/watcher-linux-x64-glibc": "2.5.1",
|
||||
"@parcel/watcher-linux-x64-musl": "2.5.1",
|
||||
"@parcel/watcher-win32-arm64": "2.5.1",
|
||||
"@parcel/watcher-win32-ia32": "2.5.1",
|
||||
"@parcel/watcher-win32-x64": "2.5.1"
|
||||
"@parcel/watcher-android-arm64": "2.5.4",
|
||||
"@parcel/watcher-darwin-arm64": "2.5.4",
|
||||
"@parcel/watcher-darwin-x64": "2.5.4",
|
||||
"@parcel/watcher-freebsd-x64": "2.5.4",
|
||||
"@parcel/watcher-linux-arm-glibc": "2.5.4",
|
||||
"@parcel/watcher-linux-arm-musl": "2.5.4",
|
||||
"@parcel/watcher-linux-arm64-glibc": "2.5.4",
|
||||
"@parcel/watcher-linux-arm64-musl": "2.5.4",
|
||||
"@parcel/watcher-linux-x64-glibc": "2.5.4",
|
||||
"@parcel/watcher-linux-x64-musl": "2.5.4",
|
||||
"@parcel/watcher-win32-arm64": "2.5.4",
|
||||
"@parcel/watcher-win32-ia32": "2.5.4",
|
||||
"@parcel/watcher-win32-x64": "2.5.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@parcel/watcher-linux-x64-glibc": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz",
|
||||
"integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==",
|
||||
"version": "2.5.4",
|
||||
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.4.tgz",
|
||||
"integrity": "sha512-UYBQvhYmgAv61LNUn24qGQdjtycFBKSK3EXr72DbJqX9aaLbtCOO8+1SkKhD/GNiJ97ExgcHBrukcYhVjrnogA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -104,27 +104,27 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/cli": {
|
||||
"version": "4.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.1.17.tgz",
|
||||
"integrity": "sha512-jUIxcyUNlCC2aNPnyPEWU/L2/ik3pB4fF3auKGXr8AvN3T3OFESVctFKOBoPZQaZJIeUpPn1uCLp0MRxuek8gg==",
|
||||
"version": "4.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.1.18.tgz",
|
||||
"integrity": "sha512-sMZ+lZbDyxwjD2E0L7oRUjJ01Ffjtme5OtjvvnC+cV4CEDcbqzbp25TCpxHj6kWLU9+DlqJOiNgSOgctC2aZmg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@parcel/watcher": "^2.5.1",
|
||||
"@tailwindcss/node": "4.1.17",
|
||||
"@tailwindcss/oxide": "4.1.17",
|
||||
"@tailwindcss/node": "4.1.18",
|
||||
"@tailwindcss/oxide": "4.1.18",
|
||||
"enhanced-resolve": "^5.18.3",
|
||||
"mri": "^1.2.0",
|
||||
"picocolors": "^1.1.1",
|
||||
"tailwindcss": "4.1.17"
|
||||
"tailwindcss": "4.1.18"
|
||||
},
|
||||
"bin": {
|
||||
"tailwindcss": "dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/node": {
|
||||
"version": "4.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.17.tgz",
|
||||
"integrity": "sha512-csIkHIgLb3JisEFQ0vxr2Y57GUNYh447C8xzwj89U/8fdW8LhProdxvnVH6U8M2Y73QKiTIH+LWbK3V2BBZsAg==",
|
||||
"version": "4.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.18.tgz",
|
||||
"integrity": "sha512-DoR7U1P7iYhw16qJ49fgXUlry1t4CpXeErJHnQ44JgTSKMaZUdf17cfn5mHchfJ4KRBZRFA/Coo+MUF5+gOaCQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/remapping": "^2.3.4",
|
||||
|
|
@ -133,36 +133,36 @@
|
|||
"lightningcss": "1.30.2",
|
||||
"magic-string": "^0.30.21",
|
||||
"source-map-js": "^1.2.1",
|
||||
"tailwindcss": "4.1.17"
|
||||
"tailwindcss": "4.1.18"
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/oxide": {
|
||||
"version": "4.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.17.tgz",
|
||||
"integrity": "sha512-F0F7d01fmkQhsTjXezGBLdrl1KresJTcI3DB8EkScCldyKp3Msz4hub4uyYaVnk88BAS1g5DQjjF6F5qczheLA==",
|
||||
"version": "4.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.18.tgz",
|
||||
"integrity": "sha512-EgCR5tTS5bUSKQgzeMClT6iCY3ToqE1y+ZB0AKldj809QXk1Y+3jB0upOYZrn9aGIzPtUsP7sX4QQ4XtjBB95A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@tailwindcss/oxide-android-arm64": "4.1.17",
|
||||
"@tailwindcss/oxide-darwin-arm64": "4.1.17",
|
||||
"@tailwindcss/oxide-darwin-x64": "4.1.17",
|
||||
"@tailwindcss/oxide-freebsd-x64": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-arm64-gnu": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-arm64-musl": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-x64-gnu": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-x64-musl": "4.1.17",
|
||||
"@tailwindcss/oxide-wasm32-wasi": "4.1.17",
|
||||
"@tailwindcss/oxide-win32-arm64-msvc": "4.1.17",
|
||||
"@tailwindcss/oxide-win32-x64-msvc": "4.1.17"
|
||||
"@tailwindcss/oxide-android-arm64": "4.1.18",
|
||||
"@tailwindcss/oxide-darwin-arm64": "4.1.18",
|
||||
"@tailwindcss/oxide-darwin-x64": "4.1.18",
|
||||
"@tailwindcss/oxide-freebsd-x64": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-arm64-gnu": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-arm64-musl": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-x64-gnu": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-x64-musl": "4.1.18",
|
||||
"@tailwindcss/oxide-wasm32-wasi": "4.1.18",
|
||||
"@tailwindcss/oxide-win32-arm64-msvc": "4.1.18",
|
||||
"@tailwindcss/oxide-win32-x64-msvc": "4.1.18"
|
||||
}
|
||||
},
|
||||
"node_modules/@tailwindcss/oxide-linux-x64-gnu": {
|
||||
"version": "4.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.17.tgz",
|
||||
"integrity": "sha512-M3XZuORCGB7VPOEDH+nzpJ21XPvK5PyjlkSFkFziNHGLc5d6g3di2McAAblmaSUNl8IOmzYwLx9NsE7bplNkwQ==",
|
||||
"version": "4.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.18.tgz",
|
||||
"integrity": "sha512-v3gyT0ivkfBLoZGF9LyHmts0Isc8jHZyVcbzio6Wpzifg/+5ZJpDiRiUhDLkcr7f/r38SWNe7ucxmGW3j3Kb/g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -175,34 +175,19 @@
|
|||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"node_modules/detect-libc": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
||||
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/detect-libc": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||
"integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"detect-libc": "bin/detect-libc.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.18.3",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz",
|
||||
"integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==",
|
||||
"version": "5.18.4",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.4.tgz",
|
||||
"integrity": "sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.4",
|
||||
|
|
@ -212,18 +197,6 @@
|
|||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
|
|
@ -251,15 +224,6 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"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==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jiti": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz",
|
||||
|
|
@ -318,15 +282,6 @@
|
|||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/lightningcss/node_modules/detect-libc": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
||||
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
"version": "0.30.21",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
|
||||
|
|
@ -336,19 +291,6 @@
|
|||
"@jridgewell/sourcemap-codec": "^1.5.5"
|
||||
}
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"braces": "^3.0.3",
|
||||
"picomatch": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mri": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
||||
|
|
@ -371,12 +313,12 @@
|
|||
"license": "ISC"
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
|
||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
|
|
@ -392,9 +334,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/tailwindcss": {
|
||||
"version": "4.1.17",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz",
|
||||
"integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==",
|
||||
"version": "4.1.18",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.18.tgz",
|
||||
"integrity": "sha512-4+Z+0yiYyEtUVCScyfHCxOYP06L5Ne+JiHhY2IjR2KWMIWhJOYZKLSGZaP5HkZ8+bY0cxfzwDE5uOmzFXyIwxw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tapable": {
|
||||
|
|
@ -409,18 +351,6 @@
|
|||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/webpack"
|
||||
}
|
||||
},
|
||||
"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==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-number": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
node_modules/@parcel/watcher-linux-x64-glibc/package.json
generated
vendored
2
node_modules/@parcel/watcher-linux-x64-glibc/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@parcel/watcher-linux-x64-glibc",
|
||||
"version": "2.5.1",
|
||||
"version": "2.5.4",
|
||||
"main": "watcher.node",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
BIN
node_modules/@parcel/watcher-linux-x64-glibc/watcher.node
generated
vendored
BIN
node_modules/@parcel/watcher-linux-x64-glibc/watcher.node
generated
vendored
Binary file not shown.
3
node_modules/@parcel/watcher/README.md
generated
vendored
3
node_modules/@parcel/watcher/README.md
generated
vendored
|
|
@ -103,7 +103,7 @@ You can specify the exact backend you wish to use by passing the `backend` optio
|
|||
|
||||
All of the APIs in `@parcel/watcher` support the following options, which are passed as an object as the last function argument.
|
||||
|
||||
- `ignore` - an array of paths or glob patterns to ignore. uses [`is-glob`](https://github.com/micromatch/is-glob) to distinguish paths from globs. glob patterns are parsed with [`micromatch`](https://github.com/micromatch/micromatch) (see [features](https://github.com/micromatch/micromatch#matching-features)).
|
||||
- `ignore` - an array of paths or glob patterns to ignore. uses [`is-glob`](https://github.com/micromatch/is-glob) to distinguish paths from globs. glob patterns are parsed with [`picomatch`](https://github.com/micromatch/picomatch) (see [features](https://github.com/micromatch/picomatch#globbing-features)).
|
||||
- paths can be relative or absolute and can either be files or directories. No events will be emitted about these files or directories or their children.
|
||||
- glob patterns match on relative paths from the root that is watched. No events will be emitted for matching paths.
|
||||
- `backend` - the name of an explicitly chosen backend to use. Allowed options are `"fs-events"`, `"watchman"`, `"inotify"`, `"kqueue"`, `"windows"`, or `"brute-force"` (only for querying). If the specified backend is not available on the current platform, the default backend will be used instead.
|
||||
|
|
@ -129,6 +129,7 @@ subscribe(/* ... */);
|
|||
- [Gatsby Cloud](https://twitter.com/chatsidhartha/status/1435647412828196867)
|
||||
- [Nx](https://nx.dev)
|
||||
- [Nuxt](https://nuxt.com)
|
||||
- [Meteor](https://github.com/meteor/meteor)
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
16
node_modules/@parcel/watcher/binding.gyp
generated
vendored
16
node_modules/@parcel/watcher/binding.gyp
generated
vendored
|
|
@ -65,7 +65,21 @@
|
|||
"msvs_settings": {
|
||||
"VCCLCompilerTool": {
|
||||
"ExceptionHandling": 1, # /EHsc
|
||||
"AdditionalOptions": ['-std:c++17']
|
||||
"AdditionalOptions": [
|
||||
"-std:c++17",
|
||||
"/guard:cf",
|
||||
"/W3",
|
||||
"/w34244",
|
||||
"/w34267",
|
||||
"/sdl",
|
||||
"/ZH:SHA_256"
|
||||
]
|
||||
},
|
||||
"VCLinkerTool": {
|
||||
"AdditionalOptions": [
|
||||
"/DYNAMICBASE",
|
||||
"/guard:cf"
|
||||
]
|
||||
}
|
||||
}
|
||||
}],
|
||||
|
|
|
|||
3
node_modules/@parcel/watcher/index.js
generated
vendored
3
node_modules/@parcel/watcher/index.js
generated
vendored
|
|
@ -2,7 +2,8 @@ const {createWrapper} = require('./wrapper');
|
|||
|
||||
let name = `@parcel/watcher-${process.platform}-${process.arch}`;
|
||||
if (process.platform === 'linux') {
|
||||
const { MUSL, family } = require('detect-libc');
|
||||
const { MUSL, familySync } = require('detect-libc');
|
||||
const family = familySync();
|
||||
if (family === MUSL) {
|
||||
name += '-musl';
|
||||
} else {
|
||||
|
|
|
|||
34
node_modules/@parcel/watcher/package.json
generated
vendored
34
node_modules/@parcel/watcher/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@parcel/watcher",
|
||||
"version": "2.5.1",
|
||||
"version": "2.5.4",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
|
|
@ -50,10 +50,10 @@
|
|||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"detect-libc": "^1.0.3",
|
||||
"detect-libc": "^2.0.3",
|
||||
"is-glob": "^4.0.3",
|
||||
"micromatch": "^4.0.5",
|
||||
"node-addon-api": "^7.0.0"
|
||||
"node-addon-api": "^7.0.0",
|
||||
"picomatch": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.19.8",
|
||||
|
|
@ -71,18 +71,18 @@
|
|||
]
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@parcel/watcher-darwin-x64": "2.5.1",
|
||||
"@parcel/watcher-darwin-arm64": "2.5.1",
|
||||
"@parcel/watcher-win32-x64": "2.5.1",
|
||||
"@parcel/watcher-win32-arm64": "2.5.1",
|
||||
"@parcel/watcher-win32-ia32": "2.5.1",
|
||||
"@parcel/watcher-linux-x64-glibc": "2.5.1",
|
||||
"@parcel/watcher-linux-x64-musl": "2.5.1",
|
||||
"@parcel/watcher-linux-arm64-glibc": "2.5.1",
|
||||
"@parcel/watcher-linux-arm64-musl": "2.5.1",
|
||||
"@parcel/watcher-linux-arm-glibc": "2.5.1",
|
||||
"@parcel/watcher-linux-arm-musl": "2.5.1",
|
||||
"@parcel/watcher-android-arm64": "2.5.1",
|
||||
"@parcel/watcher-freebsd-x64": "2.5.1"
|
||||
"@parcel/watcher-darwin-x64": "2.5.4",
|
||||
"@parcel/watcher-darwin-arm64": "2.5.4",
|
||||
"@parcel/watcher-win32-x64": "2.5.4",
|
||||
"@parcel/watcher-win32-arm64": "2.5.4",
|
||||
"@parcel/watcher-win32-ia32": "2.5.4",
|
||||
"@parcel/watcher-linux-x64-glibc": "2.5.4",
|
||||
"@parcel/watcher-linux-x64-musl": "2.5.4",
|
||||
"@parcel/watcher-linux-arm64-glibc": "2.5.4",
|
||||
"@parcel/watcher-linux-arm64-musl": "2.5.4",
|
||||
"@parcel/watcher-linux-arm-glibc": "2.5.4",
|
||||
"@parcel/watcher-linux-arm-musl": "2.5.4",
|
||||
"@parcel/watcher-android-arm64": "2.5.4",
|
||||
"@parcel/watcher-freebsd-x64": "2.5.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
22
node_modules/@parcel/watcher/src/Backend.cc
generated
vendored
22
node_modules/@parcel/watcher/src/Backend.cc
generated
vendored
|
|
@ -21,7 +21,11 @@
|
|||
#include "Backend.hh"
|
||||
#include <unordered_map>
|
||||
|
||||
static std::unordered_map<std::string, std::shared_ptr<Backend>> sharedBackends;
|
||||
static std::unordered_map<std::string, std::shared_ptr<Backend>>& getSharedBackends() {
|
||||
static std::unordered_map<std::string, std::shared_ptr<Backend>>* sharedBackends =
|
||||
new std::unordered_map<std::string, std::shared_ptr<Backend>>();
|
||||
return *sharedBackends;
|
||||
}
|
||||
|
||||
std::shared_ptr<Backend> getBackend(std::string backend) {
|
||||
// Use FSEvents on macOS by default.
|
||||
|
|
@ -65,8 +69,8 @@ std::shared_ptr<Backend> getBackend(std::string backend) {
|
|||
}
|
||||
|
||||
std::shared_ptr<Backend> Backend::getShared(std::string backend) {
|
||||
auto found = sharedBackends.find(backend);
|
||||
if (found != sharedBackends.end()) {
|
||||
auto found = getSharedBackends().find(backend);
|
||||
if (found != getSharedBackends().end()) {
|
||||
return found->second;
|
||||
}
|
||||
|
||||
|
|
@ -76,21 +80,21 @@ std::shared_ptr<Backend> Backend::getShared(std::string backend) {
|
|||
}
|
||||
|
||||
result->run();
|
||||
sharedBackends.emplace(backend, result);
|
||||
getSharedBackends().emplace(backend, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void removeShared(Backend *backend) {
|
||||
for (auto it = sharedBackends.begin(); it != sharedBackends.end(); it++) {
|
||||
for (auto it = getSharedBackends().begin(); it != getSharedBackends().end(); it++) {
|
||||
if (it->second.get() == backend) {
|
||||
sharedBackends.erase(it);
|
||||
getSharedBackends().erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Free up memory.
|
||||
if (sharedBackends.size() == 0) {
|
||||
sharedBackends.rehash(0);
|
||||
if (getSharedBackends().size() == 0) {
|
||||
getSharedBackends().rehash(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +149,7 @@ void Backend::watch(WatcherRef watcher) {
|
|||
try {
|
||||
this->subscribe(watcher);
|
||||
mSubscriptions.insert(watcher);
|
||||
} catch (std::exception &err) {
|
||||
} catch (std::exception&) {
|
||||
unref();
|
||||
throw;
|
||||
}
|
||||
|
|
|
|||
44
node_modules/@parcel/watcher/src/DirTree.cc
generated
vendored
44
node_modules/@parcel/watcher/src/DirTree.cc
generated
vendored
|
|
@ -1,34 +1,46 @@
|
|||
#include "DirTree.hh"
|
||||
#include <inttypes.h>
|
||||
|
||||
static std::mutex mDirCacheMutex;
|
||||
static std::unordered_map<std::string, std::weak_ptr<DirTree>> dirTreeCache;
|
||||
// "Meyer's singleton", construction is ordered by use, likewise (reverse) for destruction.
|
||||
// https://stackoverflow.com/a/17713799
|
||||
// https://laristra.github.io/flecsi/src/developer-guide/patterns/meyers_singleton.html
|
||||
static std::mutex& mDirCacheMutex() {
|
||||
static std::mutex mutex;
|
||||
return mutex;
|
||||
}
|
||||
|
||||
static std::unordered_map<std::string, std::weak_ptr<DirTree>>& dirTreeCache() {
|
||||
static std::unordered_map<std::string, std::weak_ptr<DirTree>> cache;
|
||||
return cache;
|
||||
}
|
||||
|
||||
struct DirTreeDeleter {
|
||||
void operator()(DirTree *tree) {
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex);
|
||||
dirTreeCache.erase(tree->root);
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex());
|
||||
std::unordered_map<std::string, std::weak_ptr<DirTree>> &cache = dirTreeCache();
|
||||
cache.erase(tree->root);
|
||||
delete tree;
|
||||
|
||||
// Free up memory.
|
||||
if (dirTreeCache.size() == 0) {
|
||||
dirTreeCache.rehash(0);
|
||||
if (cache.size() == 0) {
|
||||
cache.rehash(0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
std::shared_ptr<DirTree> DirTree::getCached(std::string root) {
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex);
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex());
|
||||
std::unordered_map<std::string, std::weak_ptr<DirTree>> &cache = dirTreeCache();
|
||||
|
||||
auto found = dirTreeCache.find(root);
|
||||
auto found = cache.find(root);
|
||||
std::shared_ptr<DirTree> tree;
|
||||
|
||||
// Use cached tree, or create an empty one.
|
||||
if (found != dirTreeCache.end()) {
|
||||
if (found != cache.end()) {
|
||||
tree = found->second.lock();
|
||||
} else {
|
||||
tree = std::shared_ptr<DirTree>(new DirTree(root), DirTreeDeleter());
|
||||
dirTreeCache.emplace(root, tree);
|
||||
cache.emplace(root, tree);
|
||||
}
|
||||
|
||||
return tree;
|
||||
|
|
@ -55,7 +67,7 @@ DirEntry *DirTree::_find(std::string path) {
|
|||
}
|
||||
|
||||
DirEntry *DirTree::add(std::string path, uint64_t mtime, bool isDir) {
|
||||
std::lock_guard<std::mutex> lock(mMutex);
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex());
|
||||
|
||||
DirEntry entry(path, mtime, isDir);
|
||||
auto it = entries.emplace(entry.path, entry);
|
||||
|
|
@ -63,12 +75,12 @@ DirEntry *DirTree::add(std::string path, uint64_t mtime, bool isDir) {
|
|||
}
|
||||
|
||||
DirEntry *DirTree::find(std::string path) {
|
||||
std::lock_guard<std::mutex> lock(mMutex);
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex());
|
||||
return _find(path);
|
||||
}
|
||||
|
||||
DirEntry *DirTree::update(std::string path, uint64_t mtime) {
|
||||
std::lock_guard<std::mutex> lock(mMutex);
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex());
|
||||
|
||||
DirEntry *found = _find(path);
|
||||
if (found) {
|
||||
|
|
@ -79,7 +91,7 @@ DirEntry *DirTree::update(std::string path, uint64_t mtime) {
|
|||
}
|
||||
|
||||
void DirTree::remove(std::string path) {
|
||||
std::lock_guard<std::mutex> lock(mMutex);
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex());
|
||||
|
||||
DirEntry *found = _find(path);
|
||||
|
||||
|
|
@ -99,7 +111,7 @@ void DirTree::remove(std::string path) {
|
|||
}
|
||||
|
||||
void DirTree::write(FILE *f) {
|
||||
std::lock_guard<std::mutex> lock(mMutex);
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex());
|
||||
|
||||
fprintf(f, "%zu\n", entries.size());
|
||||
for (auto it = entries.begin(); it != entries.end(); it++) {
|
||||
|
|
@ -108,7 +120,7 @@ void DirTree::write(FILE *f) {
|
|||
}
|
||||
|
||||
void DirTree::getChanges(DirTree *snapshot, EventList &events) {
|
||||
std::lock_guard<std::mutex> lock(mMutex);
|
||||
std::lock_guard<std::mutex> lock(mDirCacheMutex());
|
||||
std::lock_guard<std::mutex> snapshotLock(snapshot->mMutex);
|
||||
|
||||
for (auto it = entries.begin(); it != entries.end(); it++) {
|
||||
|
|
|
|||
2
node_modules/@parcel/watcher/src/Glob.hh
generated
vendored
2
node_modules/@parcel/watcher/src/Glob.hh
generated
vendored
|
|
@ -14,7 +14,7 @@ struct Glob {
|
|||
Glob(std::string raw);
|
||||
|
||||
bool operator==(const Glob &other) const {
|
||||
return mHash == other.mHash;
|
||||
return mHash == other.mHash && mRaw == other.mRaw;
|
||||
}
|
||||
|
||||
bool isIgnored(std::string relative_path) const;
|
||||
|
|
|
|||
22
node_modules/@parcel/watcher/src/Watcher.cc
generated
vendored
22
node_modules/@parcel/watcher/src/Watcher.cc
generated
vendored
|
|
@ -15,30 +15,34 @@ struct WatcherCompare {
|
|||
}
|
||||
};
|
||||
|
||||
static std::unordered_set<WatcherRef , WatcherHash, WatcherCompare> sharedWatchers;
|
||||
static std::unordered_set<WatcherRef , WatcherHash, WatcherCompare>& getSharedWatchers() {
|
||||
static std::unordered_set<WatcherRef , WatcherHash, WatcherCompare>* sharedWatchers =
|
||||
new std::unordered_set<WatcherRef , WatcherHash, WatcherCompare>();
|
||||
return *sharedWatchers;
|
||||
}
|
||||
|
||||
WatcherRef Watcher::getShared(std::string dir, std::unordered_set<std::string> ignorePaths, std::unordered_set<Glob> ignoreGlobs) {
|
||||
WatcherRef watcher = std::make_shared<Watcher>(dir, ignorePaths, ignoreGlobs);
|
||||
auto found = sharedWatchers.find(watcher);
|
||||
if (found != sharedWatchers.end()) {
|
||||
auto found = getSharedWatchers().find(watcher);
|
||||
if (found != getSharedWatchers().end()) {
|
||||
return *found;
|
||||
}
|
||||
|
||||
sharedWatchers.insert(watcher);
|
||||
getSharedWatchers().insert(watcher);
|
||||
return watcher;
|
||||
}
|
||||
|
||||
void removeShared(Watcher *watcher) {
|
||||
for (auto it = sharedWatchers.begin(); it != sharedWatchers.end(); it++) {
|
||||
for (auto it = getSharedWatchers().begin(); it != getSharedWatchers().end(); it++) {
|
||||
if (it->get() == watcher) {
|
||||
sharedWatchers.erase(it);
|
||||
getSharedWatchers().erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Free up memory.
|
||||
if (sharedWatchers.size() == 0) {
|
||||
sharedWatchers.rehash(0);
|
||||
if (getSharedWatchers().size() == 0) {
|
||||
getSharedWatchers().rehash(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +88,7 @@ struct CallbackData {
|
|||
Value callbackEventsToJS(const Env &env, std::vector<Event> &events) {
|
||||
EscapableHandleScope scope(env);
|
||||
Array arr = Array::New(env, events.size());
|
||||
size_t currentEventIndex = 0;
|
||||
uint32_t currentEventIndex = 0;
|
||||
for (auto eventIterator = events.begin(); eventIterator != events.end(); eventIterator++) {
|
||||
arr.Set(currentEventIndex++, eventIterator->toJS(env));
|
||||
}
|
||||
|
|
|
|||
8
node_modules/@parcel/watcher/src/binding.cc
generated
vendored
8
node_modules/@parcel/watcher/src/binding.cc
generated
vendored
|
|
@ -18,7 +18,7 @@ std::unordered_set<std::string> getIgnorePaths(Env env, Value opts) {
|
|||
if (v.IsArray()) {
|
||||
Array items = v.As<Array>();
|
||||
for (size_t i = 0; i < items.Length(); i++) {
|
||||
Value item = items.Get(Number::New(env, i));
|
||||
Value item = items.Get(Number::New(env, static_cast<double>(i)));
|
||||
if (item.IsString()) {
|
||||
result.insert(std::string(item.As<String>().Utf8Value().c_str()));
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ std::unordered_set<Glob> getIgnoreGlobs(Env env, Value opts) {
|
|||
if (v.IsArray()) {
|
||||
Array items = v.As<Array>();
|
||||
for (size_t i = 0; i < items.Length(); i++) {
|
||||
Value item = items.Get(Number::New(env, i));
|
||||
Value item = items.Get(Number::New(env, static_cast<double>(i)));
|
||||
if (item.IsString()) {
|
||||
auto key = item.As<String>().Utf8Value();
|
||||
try {
|
||||
|
|
@ -124,7 +124,7 @@ private:
|
|||
Value getResult() override {
|
||||
std::vector<Event> events = watcher->mEvents.getEvents();
|
||||
Array eventsArray = Array::New(env, events.size());
|
||||
size_t i = 0;
|
||||
uint32_t i = 0;
|
||||
for (auto it = events.begin(); it != events.end(); it++) {
|
||||
eventsArray.Set(i++, it->toJS(env));
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ private:
|
|||
void execute() override {
|
||||
try {
|
||||
backend->watch(watcher);
|
||||
} catch (std::exception &err) {
|
||||
} catch (std::exception&) {
|
||||
watcher->destroy();
|
||||
throw;
|
||||
}
|
||||
|
|
|
|||
8
node_modules/@parcel/watcher/src/linux/InotifyBackend.cc
generated
vendored
8
node_modules/@parcel/watcher/src/linux/InotifyBackend.cc
generated
vendored
|
|
@ -170,7 +170,9 @@ bool InotifyBackend::handleSubscription(struct inotify_event *event, std::shared
|
|||
struct stat st;
|
||||
// Use lstat to avoid resolving symbolic links that we cannot watch anyway
|
||||
// https://github.com/parcel-bundler/watcher/issues/76
|
||||
lstat(path.c_str(), &st);
|
||||
if (lstat(path.c_str(), &st) != 0) {
|
||||
return false;
|
||||
}
|
||||
DirEntry *entry = sub->tree->add(path, CONVERT_TIME(st.st_mtim), S_ISDIR(st.st_mode));
|
||||
|
||||
if (entry->isDir) {
|
||||
|
|
@ -184,7 +186,9 @@ bool InotifyBackend::handleSubscription(struct inotify_event *event, std::shared
|
|||
watcher->mEvents.update(path);
|
||||
|
||||
struct stat st;
|
||||
stat(path.c_str(), &st);
|
||||
if (stat(path.c_str(), &st) != 0) {
|
||||
return false;
|
||||
}
|
||||
sub->tree->update(path, CONVERT_TIME(st.st_mtim));
|
||||
} else if (event->mask & (IN_DELETE | IN_DELETE_SELF | IN_MOVED_FROM | IN_MOVE_SELF)) {
|
||||
bool isSelfEvent = (event->mask & (IN_DELETE_SELF | IN_MOVE_SELF));
|
||||
|
|
|
|||
6
node_modules/@parcel/watcher/src/watchman/BSER.cc
generated
vendored
6
node_modules/@parcel/watcher/src/watchman/BSER.cc
generated
vendored
|
|
@ -98,7 +98,7 @@ public:
|
|||
value.push_back(BSER(iss));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BSER::Array arrayValue() override {
|
||||
return value;
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@ public:
|
|||
BSERBoolean(bool value) : Value(value) {}
|
||||
bool boolValue() override { return value; }
|
||||
void encode(std::ostream &oss) override {
|
||||
int8_t t = value == true ? BSER_BOOL_TRUE : BSER_BOOL_FALSE;
|
||||
int8_t t = value == true ? static_cast<int8_t>(BSER_BOOL_TRUE) : static_cast<int8_t>(BSER_BOOL_FALSE);
|
||||
oss.write(reinterpret_cast<char*>(&t), sizeof(t));
|
||||
}
|
||||
};
|
||||
|
|
@ -295,7 +295,7 @@ std::string BSER::encode() {
|
|||
|
||||
std::ostringstream res(std::ios_base::binary);
|
||||
res.write("\x00\x01", 2);
|
||||
|
||||
|
||||
BSERInteger(oss.str().size()).encode(res);
|
||||
res << oss.str();
|
||||
return res.str();
|
||||
|
|
|
|||
4
node_modules/@parcel/watcher/src/watchman/IPC.hh
generated
vendored
4
node_modules/@parcel/watcher/src/watchman/IPC.hh
generated
vendored
|
|
@ -77,7 +77,7 @@ public:
|
|||
bool success = WriteFile(
|
||||
mPipe, // pipe handle
|
||||
buf.data(), // message
|
||||
buf.size(), // message length
|
||||
static_cast<DWORD>(buf.size()), // message length
|
||||
NULL, // bytes written
|
||||
&overlapped // overlapped
|
||||
);
|
||||
|
|
@ -125,7 +125,7 @@ public:
|
|||
bool success = ReadFile(
|
||||
mPipe, // pipe handle
|
||||
buf, // buffer to receive reply
|
||||
len, // size of buffer
|
||||
static_cast<DWORD>(len), // size of buffer
|
||||
NULL, // number of bytes read
|
||||
&overlapped // overlapped
|
||||
);
|
||||
|
|
|
|||
8
node_modules/@parcel/watcher/src/watchman/WatchmanBackend.cc
generated
vendored
8
node_modules/@parcel/watcher/src/watchman/WatchmanBackend.cc
generated
vendored
|
|
@ -21,7 +21,7 @@ template<typename T>
|
|||
BSER readBSER(T &&do_read) {
|
||||
std::stringstream oss;
|
||||
char buffer[256];
|
||||
int r;
|
||||
size_t r;
|
||||
int64_t len = -1;
|
||||
do {
|
||||
// Start by reading a minimal amount of data in order to decode the length.
|
||||
|
|
@ -46,7 +46,11 @@ std::string getSockPath() {
|
|||
return std::string(var);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
FILE *fp = popen("watchman --output-encoding=bser get-sockname", "r");
|
||||
#else
|
||||
FILE *fp = popen("watchman --output-encoding=bser get-sockname 2>/dev/null", "r");
|
||||
#endif
|
||||
if (fp == NULL || errno == ECHILD) {
|
||||
throw std::runtime_error("Failed to execute watchman");
|
||||
}
|
||||
|
|
@ -104,7 +108,7 @@ bool WatchmanBackend::checkAvailable() {
|
|||
try {
|
||||
watchmanConnect();
|
||||
return true;
|
||||
} catch (std::exception &err) {
|
||||
} catch (std::exception&) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
12
node_modules/@parcel/watcher/src/windows/win_utils.cc
generated
vendored
12
node_modules/@parcel/watcher/src/windows/win_utils.cc
generated
vendored
|
|
@ -5,17 +5,17 @@ std::wstring utf8ToUtf16(std::string input) {
|
|||
WCHAR *output = new WCHAR[len];
|
||||
MultiByteToWideChar(CP_UTF8, 0, input.c_str(), -1, output, len);
|
||||
std::wstring res(output);
|
||||
delete output;
|
||||
delete[] output;
|
||||
return res;
|
||||
}
|
||||
|
||||
std::string utf16ToUtf8(const WCHAR *input, size_t length) {
|
||||
std::string utf16ToUtf8(const WCHAR *input, DWORD length) {
|
||||
unsigned int len = WideCharToMultiByte(CP_UTF8, 0, input, length, NULL, 0, NULL, NULL);
|
||||
char *output = new char[len + 1];
|
||||
WideCharToMultiByte(CP_UTF8, 0, input, length, output, len, NULL, NULL);
|
||||
output[len] = '\0';
|
||||
std::string res(output);
|
||||
delete output;
|
||||
delete[] output;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ std::string normalizePath(std::string path) {
|
|||
std::wstring p = utf8ToUtf16("\\\\?\\" + path);
|
||||
|
||||
// Get the required length for the output
|
||||
unsigned int len = GetLongPathNameW(p.data(), NULL, 0);
|
||||
DWORD len = GetLongPathNameW(p.data(), NULL, 0);
|
||||
if (!len) {
|
||||
return path;
|
||||
}
|
||||
|
|
@ -33,12 +33,12 @@ std::string normalizePath(std::string path) {
|
|||
WCHAR *output = new WCHAR[len];
|
||||
len = GetLongPathNameW(p.data(), output, len);
|
||||
if (!len) {
|
||||
delete output;
|
||||
delete[] output;
|
||||
return path;
|
||||
}
|
||||
|
||||
// Convert back to utf8
|
||||
std::string res = utf16ToUtf8(output + 4, len - 4);
|
||||
delete output;
|
||||
delete[] output;
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
2
node_modules/@parcel/watcher/src/windows/win_utils.hh
generated
vendored
2
node_modules/@parcel/watcher/src/windows/win_utils.hh
generated
vendored
|
|
@ -5,7 +5,7 @@
|
|||
#include <windows.h>
|
||||
|
||||
std::wstring utf8ToUtf16(std::string input);
|
||||
std::string utf16ToUtf8(const WCHAR *input, size_t length);
|
||||
std::string utf16ToUtf8(const WCHAR *input, DWORD length);
|
||||
std::string normalizePath(std::string path);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
9
node_modules/@parcel/watcher/wrapper.js
generated
vendored
9
node_modules/@parcel/watcher/wrapper.js
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
const path = require('path');
|
||||
const micromatch = require('micromatch');
|
||||
const picomatch = require('picomatch');
|
||||
const isGlob = require('is-glob');
|
||||
|
||||
function normalizeOptions(dir, opts = {}) {
|
||||
|
|
@ -14,16 +14,13 @@ function normalizeOptions(dir, opts = {}) {
|
|||
opts.ignoreGlobs = [];
|
||||
}
|
||||
|
||||
const regex = micromatch.makeRe(value, {
|
||||
const regex = picomatch.makeRe(value, {
|
||||
// We set `dot: true` to workaround an issue with the
|
||||
// regular expression on Linux where the resulting
|
||||
// negative lookahead `(?!(\\/|^)` was never matching
|
||||
// in some cases. See also https://bit.ly/3UZlQDm
|
||||
dot: true,
|
||||
// C++ does not support lookbehind regex patterns, they
|
||||
// were only added later to JavaScript engines
|
||||
// (https://bit.ly/3V7S6UL)
|
||||
lookbehinds: false
|
||||
windows: process.platform === 'win32',
|
||||
});
|
||||
opts.ignoreGlobs.push(regex.source);
|
||||
} else {
|
||||
|
|
|
|||
10
node_modules/@tailwindcss/cli/dist/index.mjs
generated
vendored
10
node_modules/@tailwindcss/cli/dist/index.mjs
generated
vendored
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env node
|
||||
var se=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),le=e=>{throw TypeError(e)};var q=(e,t,n)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&le("Object expected");var i,o;n&&(i=t[se("asyncDispose")]),i===void 0&&(i=t[se("dispose")],n&&(o=i)),typeof i!="function"&&le("Object not disposable"),o&&(i=function(){try{o.call(this)}catch(r){return Promise.reject(r)}}),e.push([n,i,t])}else n&&e.push([n]);return t},K=(e,t,n)=>{var i=typeof SuppressedError=="function"?SuppressedError:function(u,s,l,p){return p=Error(l),p.name="SuppressedError",p.error=u,p.suppressed=s,p},o=u=>t=n?new i(u,t,"An error was suppressed during disposal"):(n=!0,u),r=u=>{for(;u=e.pop();)try{var s=u[1]&&u[1].call(u[2]);if(u[0])return Promise.resolve(s).then(r,l=>(o(l),r()))}catch(l){o(l)}if(n)throw t};return r()};import Ae from"mri";function ue(e,t=process.argv.slice(2)){for(let[o,r]of t.entries())r==="-"&&(t[o]="__IO_DEFAULT_VALUE__");let n=Ae(t);for(let o in n)n[o]==="__IO_DEFAULT_VALUE__"&&(n[o]="-");let i={_:n._};for(let[o,{type:r,alias:u,default:s=r==="boolean"?!1:null}]of Object.entries(e)){if(i[o]=s,u){let l=u.slice(1);n[l]!==void 0&&(i[o]=ae(n[l],r))}{let l=o.slice(2);n[l]!==void 0&&(i[o]=ae(n[l],r))}}return i}function ae(e,t){switch(t){case"string":return z(e);case"boolean":return O(e);case"number":return R(e);case"boolean | string":return O(e)??z(e);case"number | string":return R(e)??z(e);case"boolean | number":return O(e)??R(e);case"boolean | number | string":return O(e)??R(e)??z(e);default:throw new Error(`Unhandled type: ${t}`)}}function O(e){if(e===!0||e===!1)return e;if(e==="true")return!0;if(e==="false")return!1}function R(e){if(typeof e=="number")return e;{let t=Number(e);if(!Number.isNaN(t))return t}}function z(e){return`${e}`}import We from"@parcel/watcher";import{compile as Ee,env as Ue,Instrumentation as me,optimize as Pe,toSourceMap as he}from"@tailwindcss/node";import{clearRequireCache as Le}from"@tailwindcss/node/require-cache";import{Scanner as je}from"@tailwindcss/oxide";import{existsSync as Ie}from"fs";import X from"fs/promises";import C from"path";var k=class{#e=new Set([]);queueMacrotask(t){let n=setTimeout(t,0);return this.add(()=>{clearTimeout(n)})}add(t){return this.#e.add(t),()=>{this.#e.delete(t),t()}}async dispose(){for(let t of this.#e)await t();this.#e.clear()}};import Re from"fs";import de from"path";import{stripVTControlCharacters as ze}from"util";import w from"picocolors";import pe from"enhanced-resolve";import Me from"fs";import{createRequire as Be}from"module";var Oe=Be(import.meta.url).resolve;function ce(e){if(typeof globalThis.__tw_resolve=="function"){let t=globalThis.__tw_resolve(e);if(t)return t}return Oe(e)}var Xe=pe.ResolverFactory.createResolver({fileSystem:new pe.CachedInputFileSystem(Me,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});function fe(e){let t=typeof e=="number"?BigInt(e):e;return t<1000n?`${t}ns`:(t/=1000n,t<1000n?`${t}\xB5s`:(t/=1000n,t<1000n?`${t}ms`:(t/=1000n,t<60n?`${t}s`:(t/=60n,t<60n?`${t}m`:(t/=60n,t<24n?`${t}h`:(t/=24n,`${t}d`))))))}var D={indent:2};function N(){return`${w.italic(w.bold(w.blue("\u2248")))} tailwindcss ${w.blue(`v${De()}`)}`}function F(e){return`${w.dim(w.blue("`"))}${w.blue(e)}${w.dim(w.blue("`"))}`}function W(e,t=process.cwd(),{preferAbsoluteIfShorter:n=!0}={}){let i=de.relative(t,e);return i.startsWith("..")||(i=`.${de.sep}${i}`),n&&i.length>e.length?e:i}function G(e,t){let n=e.split(" "),i=[],o="",r=0;for(let u of n){let s=ze(u).length;r+s+1>t&&(i.push(o),o="",r=0),o+=(r?" ":"")+u,r+=s+(r?1:0)}return r&&i.push(o),i}function E(e){let t=fe(e);return e<=50*1e6?w.green(t):e<=300*1e6?w.blue(t):e<=1e3*1e6?w.yellow(t):w.red(t)}function A(e,t=0){return`${" ".repeat(t+D.indent)}${e}`}function x(e=""){process.stderr.write(`${e}
|
||||
var le=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ae=e=>{throw TypeError(e)};var G=(e,t,i)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&ae("Object expected");var r,o;i&&(r=t[le("asyncDispose")]),r===void 0&&(r=t[le("dispose")],i&&(o=r)),typeof r!="function"&&ae("Object not disposable"),o&&(r=function(){try{o.call(this)}catch(n){return Promise.reject(n)}}),e.push([i,r,t])}else i&&e.push([i]);return t},J=(e,t,i)=>{var r=typeof SuppressedError=="function"?SuppressedError:function(u,s,l,p){return p=Error(l),p.name="SuppressedError",p.error=u,p.suppressed=s,p},o=u=>t=i?new r(u,t,"An error was suppressed during disposal"):(i=!0,u),n=u=>{for(;u=e.pop();)try{var s=u[1]&&u[1].call(u[2]);if(u[0])return Promise.resolve(s).then(n,l=>(o(l),n()))}catch(l){o(l)}if(i)throw t};return n()};import ke from"mri";function pe(e,t=process.argv.slice(2)){for(let[o,n]of t.entries())n==="-"&&(t[o]="__IO_DEFAULT_VALUE__");let i=ke(t);for(let o in i){let n=i[o];o!=="_"&&Array.isArray(n)&&(n=n[n.length-1]),n==="__IO_DEFAULT_VALUE__"&&(n="-"),i[o]=n}let r={_:i._};for(let[o,{type:n,alias:u,default:s=n==="boolean"?!1:null}]of Object.entries(e)){if(r[o]=s,u){let l=u.slice(1);i[l]!==void 0&&(r[o]=ue(i[l],n))}{let l=o.slice(2);i[l]!==void 0&&(r[o]=ue(i[l],n))}}return r}function ue(e,t){switch(t){case"string":return D(e);case"boolean":return O(e);case"number":return R(e);case"boolean | string":return O(e)??D(e);case"number | string":return R(e)??D(e);case"boolean | number":return O(e)??R(e);case"boolean | number | string":return O(e)??R(e)??D(e);default:throw new Error(`Unhandled type: ${t}`)}}function O(e){if(e===!0||e===!1)return e;if(e==="true")return!0;if(e==="false")return!1}function R(e){if(typeof e=="number")return e;{let t=Number(e);if(!Number.isNaN(t))return t}}function D(e){return`${e}`}import We from"@parcel/watcher";import{compile as Ee,env as Ue,Instrumentation as he,optimize as Pe,toSourceMap as P}from"@tailwindcss/node";import{clearRequireCache as Ie}from"@tailwindcss/node/require-cache";import{Scanner as Le}from"@tailwindcss/oxide";import{existsSync as je}from"fs";import Z from"fs/promises";import C from"path";var A=class{#e=new Set([]);queueMacrotask(t){let i=setTimeout(t,0);return this.add(()=>{clearTimeout(i)})}add(t){return this.#e.add(t),()=>{this.#e.delete(t),t()}}async dispose(){for(let t of this.#e)await t();this.#e.clear()}};import Re from"fs";import me from"path";import{stripVTControlCharacters as De}from"util";import w from"picocolors";import ce from"enhanced-resolve";import Me from"fs";import{createRequire as Be}from"module";var Oe=Be(import.meta.url).resolve;function fe(e){if(typeof globalThis.__tw_resolve=="function"){let t=globalThis.__tw_resolve(e);if(t)return t}return Oe(e)}var Xe=ce.ResolverFactory.createResolver({fileSystem:new ce.CachedInputFileSystem(Me,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});function de(e){let t=typeof e=="number"?BigInt(e):e;return t<1000n?`${t}ns`:(t/=1000n,t<1000n?`${t}\xB5s`:(t/=1000n,t<1000n?`${t}ms`:(t/=1000n,t<60n?`${t}s`:(t/=60n,t<60n?`${t}m`:(t/=60n,t<24n?`${t}h`:(t/=24n,`${t}d`))))))}var z={indent:2};function N(){return`${w.italic(w.bold(w.blue("\u2248")))} tailwindcss ${w.blue(`v${ze()}`)}`}function F(e){return`${w.dim(w.blue("`"))}${w.blue(e)}${w.dim(w.blue("`"))}`}function W(e,t=process.cwd(),{preferAbsoluteIfShorter:i=!0}={}){let r=me.relative(t,e);return r.startsWith("..")||(r=`.${me.sep}${r}`),i&&r.length>e.length?e:r}function Q(e,t){let i=e.split(" "),r=[],o="",n=0;for(let u of i){let s=De(u).length;n+s+1>t&&(r.push(o),o="",n=0),o+=(n?" ":"")+u,n+=s+(n?1:0)}return n&&r.push(o),r}function E(e){let t=de(e);return e<=50*1e6?w.green(t):e<=300*1e6?w.blue(t):e<=1e3*1e6?w.yellow(t):w.red(t)}function k(e,t=0){return`${" ".repeat(t+z.indent)}${e}`}function x(e=""){process.stderr.write(`${e}
|
||||
`)}function h(e=""){process.stdout.write(`${e}
|
||||
`)}function De(){if(typeof globalThis.__tw_version=="string")return globalThis.__tw_version;let{version:e}=JSON.parse(Re.readFileSync(ce("tailwindcss/package.json"),"utf-8"));return e}import J from"fs/promises";import Ne from"path";function Q(){return new Promise((e,t)=>{let n="";process.stdin.on("data",i=>{n+=i}),process.stdin.on("end",()=>e(n)),process.stdin.on("error",i=>t(i))})}async function Y(e,t){try{if(await J.readFile(e,"utf8")===t)return}catch{}await J.mkdir(Ne.dirname(e),{recursive:!0}),await J.writeFile(e,t,"utf8")}var ye=String.raw,a=Ue.DEBUG;function U(){return{"--input":{type:"string",description:"Input file",alias:"-i"},"--output":{type:"string",description:"Output file",alias:"-o",default:"-"},"--watch":{type:"boolean | string",description:"Watch for changes and rebuild as needed, and use `always` to keep watching when stdin is closed",alias:"-w",values:["always"]},"--minify":{type:"boolean",description:"Optimize and minify the output",alias:"-m"},"--optimize":{type:"boolean",description:"Optimize the output without minifying"},"--cwd":{type:"string",description:"The current working directory",default:"."},"--map":{type:"boolean | string",description:"Generate a source map",default:!1}}}async function H(e){try{return await e()}catch(t){t instanceof Error&&x(t.toString()),process.exit(1)}}async function ge(e){var ne=[];try{x(N());x();let t=q(ne,new me);a&&t.start("[@tailwindcss/cli] (initial build)");let n=C.resolve(e["--cwd"]);e["--output"]&&e["--output"]!=="-"&&(e["--output"]=C.resolve(n,e["--output"]));e["--input"]&&e["--input"]!=="-"&&(e["--input"]=C.resolve(n,e["--input"]),Ie(e["--input"])||(x(`Specified input file ${F(W(e["--input"]))} does not exist.`),process.exit(1)));e["--input"]===e["--output"]&&e["--input"]!=="-"&&(x(`Specified input file ${F(W(e["--input"]))} and output file ${F(W(e["--output"]))} are identical.`),process.exit(1));e["--map"]==="-"&&(x("Use --map without a value to inline the source map"),process.exit(1));e["--map"]&&e["--map"]!==!0&&(e["--map"]=C.resolve(n,e["--map"]));let i=process.hrtime.bigint();let o=e["--input"]?e["--input"]==="-"?await Q():await X.readFile(e["--input"],"utf-8"):ye`
|
||||
`)}function ze(){if(typeof globalThis.__tw_version=="string")return globalThis.__tw_version;let{version:e}=JSON.parse(Re.readFileSync(fe("tailwindcss/package.json"),"utf-8"));return e}import U from"fs/promises";import Ne from"path";function Y(){return new Promise((e,t)=>{let i="";process.stdin.on("data",r=>{i+=r}),process.stdin.on("end",()=>e(i)),process.stdin.on("error",r=>t(r))})}async function H(e,t){if(!await U.stat(e).then(r=>r.isCharacterDevice()||r.isFIFO()).catch(()=>!1))try{if(await U.readFile(e,"utf8")===t)return}catch{}await U.mkdir(Ne.dirname(e),{recursive:!0}),await U.writeFile(e,t,"utf8")}var ye=String.raw,a=Ue.DEBUG;function I(){return{"--input":{type:"string",description:"Input file",alias:"-i"},"--output":{type:"string",description:"Output file",alias:"-o",default:"-"},"--watch":{type:"boolean | string",description:"Watch for changes and rebuild as needed, and use `always` to keep watching when stdin is closed",alias:"-w",values:["always"]},"--minify":{type:"boolean",description:"Optimize and minify the output",alias:"-m"},"--optimize":{type:"boolean",description:"Optimize the output without minifying"},"--cwd":{type:"string",description:"The current working directory",default:"."},"--map":{type:"boolean | string",description:"Generate a source map",default:!1}}}async function X(e){try{return await e()}catch(t){t instanceof Error&&x(t.toString()),process.exit(1)}}async function ge(e){var ie=[];try{x(N());x();let t=G(ie,new he);a&&t.start("[@tailwindcss/cli] (initial build)");let i=C.resolve(e["--cwd"]);e["--output"]&&e["--output"]!=="-"&&(e["--output"]=C.resolve(i,e["--output"]));e["--input"]&&e["--input"]!=="-"&&(e["--input"]=C.resolve(i,e["--input"]),je(e["--input"])||(x(`Specified input file ${F(W(e["--input"]))} does not exist.`),process.exit(1)));e["--input"]===e["--output"]&&e["--input"]!=="-"&&(x(`Specified input file ${F(W(e["--input"]))} and output file ${F(W(e["--output"]))} are identical.`),process.exit(1));e["--map"]==="-"&&(x("Use --map without a value to inline the source map"),process.exit(1));e["--map"]&&e["--map"]!==!0&&(e["--map"]=C.resolve(i,e["--map"]));let r=process.hrtime.bigint();let o=e["--input"]?e["--input"]==="-"?await Y():await Z.readFile(e["--input"],"utf-8"):ye`
|
||||
@import 'tailwindcss';
|
||||
`;let r={css:"",optimizedCss:""};async function u(g,b,f,S){let $=g;if(f["--minify"]||f["--optimize"])if(g!==r.css){a&&S.start("Optimize CSS");let T=Pe(g,{file:f["--input"]??"input.css",minify:f["--minify"]??!1,map:b?.raw??void 0});a&&S.end("Optimize CSS"),r.css=g,r.optimizedCss=T.code,T.map&&(b=he(T.map)),$=T.code}else $=r.optimizedCss;b&&(f["--map"]===!0?($+=`
|
||||
`,$+=b.inline):typeof f["--map"]=="string"&&(a&&S.start("Write source map"),await Y(f["--map"],b.raw),a&&S.end("Write source map"))),a&&S.start("Write output"),f["--output"]&&f["--output"]!=="-"?await Y(f["--output"],$):h($),a&&S.end("Write output")}let s=e["--input"]&&e["--input"]!=="-"?C.resolve(e["--input"]):null;let l=s?C.dirname(s):process.cwd();let p=s?[s]:[];async function m(g,b){a&&b.start("Setup compiler");let f=await Ee(g,{from:e["--output"]?s??"stdin.css":void 0,base:l,onDependency(T){p.push(T)}}),S=(f.root==="none"?[]:f.root===null?[{base:n,pattern:"**/*",negated:!1}]:[{...f.root,negated:!1}]).concat(f.sources),$=new je({sources:S});return a&&b.end("Setup compiler"),[f,$]}let[d,y]=await H(()=>m(o,t));if(e["--watch"]){let g=[];g.push(await we(be(y),async function b(f){try{var S=[];try{if(f.length===1&&f[0]===e["--output"])return;let c=q(S,new me);a&&c.start("[@tailwindcss/cli] (watcher)");let ie=process.hrtime.bigint();let re=[];let L="incremental";let oe=p;for(let _ of f){if(oe.includes(_)){L="full";break}re.push({file:_,extension:C.extname(_).slice(1)})}let j="";let I=null;if(L==="full"){let _=e["--input"]?e["--input"]==="-"?await Q():await X.readFile(e["--input"],"utf-8"):ye`
|
||||
`;let n={css:"",optimizedCss:""};async function u(g,b,f,S){let $=g;if(f["--minify"]||f["--optimize"])if(g!==n.css){a&&S.start("Optimize CSS");let T=Pe(g,{file:f["--input"]??"input.css",minify:f["--minify"]??!1,map:b?.raw??void 0});a&&S.end("Optimize CSS"),n.css=g,n.optimizedCss=T.code,T.map&&(b=P(T.map)),$=T.code}else $=n.optimizedCss;b&&(f["--map"]===!0?($+=`
|
||||
`,$+=b.inline):typeof f["--map"]=="string"&&(a&&S.start("Write source map"),await H(f["--map"],b.raw),a&&S.end("Write source map"))),a&&S.start("Write output"),f["--output"]&&f["--output"]!=="-"?await H(f["--output"],$):h($),a&&S.end("Write output")}let s=e["--input"]&&e["--input"]!=="-"?C.resolve(e["--input"]):null;let l=s?C.dirname(s):process.cwd();let p=s?[s]:[];async function m(g,b){a&&b.start("Setup compiler");let f=await Ee(g,{from:e["--output"]?s??"stdin.css":void 0,base:l,onDependency(T){p.push(T)}}),S=(f.root==="none"?[]:f.root===null?[{base:i,pattern:"**/*",negated:!1}]:[{...f.root,negated:!1}]).concat(f.sources),$=new Le({sources:S});return a&&b.end("Setup compiler"),[f,$]}let[d,y]=await X(()=>m(o,t));if(e["--watch"]){let g=[];g.push(await we(be(y),async function b(f){try{var S=[];try{if(f.length===1&&f[0]===e["--output"])return;let c=G(S,new he);a&&c.start("[@tailwindcss/cli] (watcher)");let re=process.hrtime.bigint();let oe=[];let j="incremental";let se=p;for(let _ of f){if(se.includes(_)){j="full";break}oe.push({file:_,extension:C.extname(_).slice(1)})}let V="";let q=null;if(j==="full"){let _=e["--input"]?e["--input"]==="-"?await Y():await Z.readFile(e["--input"],"utf-8"):ye`
|
||||
@import 'tailwindcss';
|
||||
`;Le(oe),p=s?[s]:[],[d,y]=await m(_,c),a&&c.start("Scan for candidates");let V=y.scan();a&&c.end("Scan for candidates"),a&&c.start("Setup new watchers");let Fe=await we(be(y),b);a&&c.end("Setup new watchers"),a&&c.start("Cleanup old watchers"),await Promise.all(g.splice(0).map(ke=>ke())),a&&c.end("Cleanup old watchers"),g.push(Fe),a&&c.start("Build CSS"),j=d.build(V),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),I=d.buildSourceMap(),a&&c.end("Build Source Map"))}else if(L==="incremental"){a&&c.start("Scan for candidates");let _=y.scanFiles(re);if(a&&c.end("Scan for candidates"),_.length<=0){let V=process.hrtime.bigint();x(`Done in ${E(V-ie)}`);return}a&&c.start("Build CSS"),j=d.build(_),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),I=d.buildSourceMap(),a&&c.end("Build Source Map"))}await u(j,I,e,c);let Ce=process.hrtime.bigint();x(`Done in ${E(Ce-ie)}`)}catch($){var T=$,ve=!0}finally{K(S,T,ve)}}catch(c){c instanceof Error&&x(c.toString())}})),e["--watch"]!=="always"&&process.stdin.on("end",()=>{Promise.all(g.map(b=>b())).then(()=>process.exit(0),()=>process.exit(1))}),process.stdin.resume()}a&&t.start("Scan for candidates");let P=y.scan();a&&t.end("Scan for candidates");a&&t.start("Build CSS");let M=await H(()=>d.build(P));a&&t.end("Build CSS");let B=null;e["--map"]&&(a&&t.start("Build Source Map"),B=await H(()=>he(d.buildSourceMap())),a&&t.end("Build Source Map"));await u(M,B,e,t);let xe=process.hrtime.bigint();x(`Done in ${E(xe-i)}`)}catch($e){var Te=$e,_e=!0}finally{K(ne,Te,_e)}}async function we(e,t){e=e.sort((s,l)=>s.length-l.length);let n=[];for(let s=0;s<e.length;++s)for(let l=0;l<s;++l)e[s].startsWith(`${e[l]}/`)&&n.push(e[s]);e=e.filter(s=>!n.includes(s));let i=new k,o=new Set,r=new k;async function u(){await r.dispose(),r.queueMacrotask(()=>{t(Array.from(o)),o.clear()})}for(let s of e){let{unsubscribe:l}=await We.subscribe(s,async(p,m)=>{if(p){console.error(p);return}await Promise.all(m.map(async d=>{if(d.type==="delete")return;let y=null;try{y=await X.lstat(d.path)}catch{}!y?.isFile()&&!y?.isSymbolicLink()||o.add(d.path)})),await u()});i.add(l)}return async()=>{await i.dispose(),await r.dispose()}}function be(e){return[...new Set(e.normalizedSources.flatMap(t=>t.base))]}import v from"picocolors";function Z({invalid:e,usage:t,options:n}){let i=process.stdout.columns;if(h(N()),e&&(h(),h(`${v.dim("Invalid command:")} ${e}`)),t&&t.length>0){h(),h(v.dim("Usage:"));for(let[o,r]of t.entries()){let u=r.slice(0,r.indexOf("[")),s=r.slice(r.indexOf("["));s=s.replace(/\[.*?\]/g,m=>v.dim(m));let p=G(s,i-D.indent-u.length-1);p.length>1&&o!==0&&h(),h(A(`${u}${p.shift()}`));for(let m of p)h(A(m,u.length))}}if(n){let o=0;for(let{alias:l}of Object.values(n))l&&(o=Math.max(o,l.length));let r=[],u=0;for(let[l,{alias:p,values:m}]of Object.entries(n)){m?.length&&(l+=`[=${m.join(", ")}]`);let d=[p&&`${p.padStart(o)}`,p?l:" ".repeat(o+2)+l].filter(Boolean).join(", ");r.push(d),u=Math.max(u,d.length)}h(),h(v.dim("Options:"));let s=8;for(let{description:l,default:p=null}of Object.values(n)){let m=r.shift(),d=s+(u-m.length),y=2,P=i-m.length-d-y-D.indent,M=G(p!==null?`${l} ${v.dim(`[default:\u202F${F(`${p}`)}]`)}`:l,P);h(A(`${v.blue(m)} ${v.dim(v.gray("\xB7")).repeat(d)} ${M.shift()}`));for(let B of M)h(A(`${" ".repeat(m.length+d+y)}${B}`))}}}var ee={"--help":{type:"boolean",description:"Display usage information",alias:"-h"}},te=ue({...U(),...ee}),Se=te._[0];Se&&(Z({invalid:Se,usage:["tailwindcss [options]"],options:{...U(),...ee}}),process.exit(1));(process.stdout.isTTY&&process.argv[2]===void 0||te["--help"])&&(Z({usage:["tailwindcss [--input input.css] [--output output.css] [--watch] [options\u2026]"],options:{...U(),...ee}}),process.exit(0));ge(te);
|
||||
`;Ie(se),p=s?[s]:[],[d,y]=await m(_,c),a&&c.start("Scan for candidates");let K=y.scan();a&&c.end("Scan for candidates"),a&&c.start("Setup new watchers");let Fe=await we(be(y),b);a&&c.end("Setup new watchers"),a&&c.start("Cleanup old watchers"),await Promise.all(g.splice(0).map(Ae=>Ae())),a&&c.end("Cleanup old watchers"),g.push(Fe),a&&c.start("Build CSS"),V=d.build(K),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),q=P(d.buildSourceMap()),a&&c.end("Build Source Map"))}else if(j==="incremental"){a&&c.start("Scan for candidates");let _=y.scanFiles(oe);if(a&&c.end("Scan for candidates"),_.length<=0){let K=process.hrtime.bigint();x(`Done in ${E(K-re)}`);return}a&&c.start("Build CSS"),V=d.build(_),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),q=P(d.buildSourceMap()),a&&c.end("Build Source Map"))}await u(V,q,e,c);let Ce=process.hrtime.bigint();x(`Done in ${E(Ce-re)}`)}catch($){var T=$,ve=!0}finally{J(S,T,ve)}}catch(c){c instanceof Error&&x(c.toString())}})),e["--watch"]!=="always"&&process.stdin.on("end",()=>{Promise.all(g.map(b=>b())).then(()=>process.exit(0),()=>process.exit(1))}),process.stdin.resume()}a&&t.start("Scan for candidates");let L=y.scan();a&&t.end("Scan for candidates");a&&t.start("Build CSS");let M=await X(()=>d.build(L));a&&t.end("Build CSS");let B=null;e["--map"]&&(a&&t.start("Build Source Map"),B=await X(()=>P(d.buildSourceMap())),a&&t.end("Build Source Map"));await u(M,B,e,t);let xe=process.hrtime.bigint();x(`Done in ${E(xe-r)}`)}catch($e){var Te=$e,_e=!0}finally{J(ie,Te,_e)}}async function we(e,t){e=e.sort((s,l)=>s.length-l.length);let i=[];for(let s=0;s<e.length;++s)for(let l=0;l<s;++l)e[s].startsWith(`${e[l]}/`)&&i.push(e[s]);e=e.filter(s=>!i.includes(s));let r=new A,o=new Set,n=new A;async function u(){await n.dispose(),n.queueMacrotask(()=>{t(Array.from(o)),o.clear()})}for(let s of e){let{unsubscribe:l}=await We.subscribe(s,async(p,m)=>{if(p){console.error(p);return}await Promise.all(m.map(async d=>{if(d.type==="delete")return;let y=null;try{y=await Z.lstat(d.path)}catch{}!y?.isFile()&&!y?.isSymbolicLink()||o.add(d.path)})),await u()});r.add(l)}return async()=>{await r.dispose(),await n.dispose()}}function be(e){return[...new Set(e.normalizedSources.flatMap(t=>t.base))]}import v from"picocolors";function ee({invalid:e,usage:t,options:i}){let r=process.stdout.columns;if(h(N()),e&&(h(),h(`${v.dim("Invalid command:")} ${e}`)),t&&t.length>0){h(),h(v.dim("Usage:"));for(let[o,n]of t.entries()){let u=n.slice(0,n.indexOf("[")),s=n.slice(n.indexOf("["));s=s.replace(/\[.*?\]/g,m=>v.dim(m));let p=Q(s,r-z.indent-u.length-1);p.length>1&&o!==0&&h(),h(k(`${u}${p.shift()}`));for(let m of p)h(k(m,u.length))}}if(i){let o=0;for(let{alias:l}of Object.values(i))l&&(o=Math.max(o,l.length));let n=[],u=0;for(let[l,{alias:p,values:m}]of Object.entries(i)){m?.length&&(l+=`[=${m.join(", ")}]`);let d=[p&&`${p.padStart(o)}`,p?l:" ".repeat(o+2)+l].filter(Boolean).join(", ");n.push(d),u=Math.max(u,d.length)}h(),h(v.dim("Options:"));let s=8;for(let{description:l,default:p=null}of Object.values(i)){let m=n.shift(),d=s+(u-m.length),y=2,L=r-m.length-d-y-z.indent,M=Q(p!==null?`${l} ${v.dim(`[default:\u202F${F(`${p}`)}]`)}`:l,L);h(k(`${v.blue(m)} ${v.dim(v.gray("\xB7")).repeat(d)} ${M.shift()}`));for(let B of M)h(k(`${" ".repeat(m.length+d+y)}${B}`))}}}var te={"--help":{type:"boolean",description:"Display usage information",alias:"-h"}},ne=pe({...I(),...te}),Se=ne._[0];Se&&(ee({invalid:Se,usage:["tailwindcss [options]"],options:{...I(),...te}}),process.exit(1));(process.stdout.isTTY&&process.argv[2]===void 0||ne["--help"])&&(ee({usage:["tailwindcss [--input input.css] [--output output.css] [--watch] [options\u2026]"],options:{...I(),...te}}),process.exit(0));ge(ne);
|
||||
|
|
|
|||
8
node_modules/@tailwindcss/cli/package.json
generated
vendored
8
node_modules/@tailwindcss/cli/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@tailwindcss/cli",
|
||||
"version": "4.1.17",
|
||||
"version": "4.1.18",
|
||||
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
|
@ -28,9 +28,9 @@
|
|||
"enhanced-resolve": "^5.18.3",
|
||||
"mri": "^1.2.0",
|
||||
"picocolors": "^1.1.1",
|
||||
"@tailwindcss/node": "4.1.17",
|
||||
"@tailwindcss/oxide": "4.1.17",
|
||||
"tailwindcss": "4.1.17"
|
||||
"@tailwindcss/node": "4.1.18",
|
||||
"tailwindcss": "4.1.18",
|
||||
"@tailwindcss/oxide": "4.1.18"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "tsc --noEmit",
|
||||
|
|
|
|||
2
node_modules/@tailwindcss/node/dist/index.d.mts
generated
vendored
2
node_modules/@tailwindcss/node/dist/index.d.mts
generated
vendored
|
|
@ -1,3 +1,4 @@
|
|||
import { AstNode as AstNode$1 } from './ast';
|
||||
import { Candidate, Variant } from './candidate';
|
||||
import { compileAstNodes } from './compile';
|
||||
import { ClassEntry, VariantEntry, CanonicalizeOptions } from './intellisense';
|
||||
|
|
@ -38,6 +39,7 @@ type DesignSystem = {
|
|||
trackUsedVariables(raw: string): void;
|
||||
canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[];
|
||||
candidatesToCss(classes: string[]): (string | null)[];
|
||||
candidatesToAst(classes: string[]): AstNode$1[][];
|
||||
storage: Record<symbol, unknown>;
|
||||
};
|
||||
|
||||
|
|
|
|||
2
node_modules/@tailwindcss/node/dist/index.d.ts
generated
vendored
2
node_modules/@tailwindcss/node/dist/index.d.ts
generated
vendored
|
|
@ -1,3 +1,4 @@
|
|||
import { AstNode as AstNode$1 } from './ast';
|
||||
import { Candidate, Variant } from './candidate';
|
||||
import { compileAstNodes } from './compile';
|
||||
import { ClassEntry, VariantEntry, CanonicalizeOptions } from './intellisense';
|
||||
|
|
@ -38,6 +39,7 @@ type DesignSystem = {
|
|||
trackUsedVariables(raw: string): void;
|
||||
canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[];
|
||||
candidatesToCss(classes: string[]): (string | null)[];
|
||||
candidatesToAst(classes: string[]): AstNode$1[][];
|
||||
storage: Record<symbol, unknown>;
|
||||
};
|
||||
|
||||
|
|
|
|||
18
node_modules/@tailwindcss/node/dist/index.js
generated
vendored
18
node_modules/@tailwindcss/node/dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
26
node_modules/@tailwindcss/node/dist/index.mjs
generated
vendored
26
node_modules/@tailwindcss/node/dist/index.mjs
generated
vendored
File diff suppressed because one or more lines are too long
4
node_modules/@tailwindcss/node/package.json
generated
vendored
4
node_modules/@tailwindcss/node/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@tailwindcss/node",
|
||||
"version": "4.1.17",
|
||||
"version": "4.1.18",
|
||||
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
"lightningcss": "1.30.2",
|
||||
"magic-string": "^0.30.21",
|
||||
"source-map-js": "^1.2.1",
|
||||
"tailwindcss": "4.1.17"
|
||||
"tailwindcss": "4.1.18"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup-node",
|
||||
|
|
|
|||
2
node_modules/@tailwindcss/oxide-linux-x64-gnu/package.json
generated
vendored
2
node_modules/@tailwindcss/oxide-linux-x64-gnu/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@tailwindcss/oxide-linux-x64-gnu",
|
||||
"version": "4.1.17",
|
||||
"version": "4.1.18",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
|
||||
|
|
|
|||
BIN
node_modules/@tailwindcss/oxide-linux-x64-gnu/tailwindcss-oxide.linux-x64-gnu.node
generated
vendored
BIN
node_modules/@tailwindcss/oxide-linux-x64-gnu/tailwindcss-oxide.linux-x64-gnu.node
generated
vendored
Binary file not shown.
104
node_modules/@tailwindcss/oxide/index.js
generated
vendored
104
node_modules/@tailwindcss/oxide/index.js
generated
vendored
|
|
@ -77,8 +77,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-android-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-android-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -93,8 +93,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-android-arm-eabi')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-android-arm-eabi/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -114,8 +114,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-x64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -130,8 +130,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-x64-msvc')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-x64-msvc/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -147,8 +147,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-ia32-msvc')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-ia32-msvc/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -163,8 +163,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-win32-arm64-msvc')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-win32-arm64-msvc/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -182,8 +182,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-darwin-universal')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-universal/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -198,8 +198,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-darwin-x64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-x64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -214,8 +214,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-darwin-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-darwin-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -234,8 +234,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-freebsd-x64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-x64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -250,8 +250,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-freebsd-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-freebsd-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -271,8 +271,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-x64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -287,8 +287,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-x64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-x64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -305,8 +305,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -321,8 +321,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -339,8 +339,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm-musleabihf')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-musleabihf/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -355,8 +355,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-arm-gnueabihf')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-arm-gnueabihf/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -373,8 +373,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-loong64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -389,8 +389,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-loong64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-loong64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -407,8 +407,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-riscv64-musl')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-musl/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -423,8 +423,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-riscv64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-riscv64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -440,8 +440,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-ppc64-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-ppc64-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -456,8 +456,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-linux-s390x-gnu')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-linux-s390x-gnu/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -476,8 +476,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-openharmony-arm64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -492,8 +492,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-openharmony-x64')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-x64/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
@ -508,8 +508,8 @@ function requireNative() {
|
|||
try {
|
||||
const binding = require('@tailwindcss/oxide-openharmony-arm')
|
||||
const bindingPackageVersion = require('@tailwindcss/oxide-openharmony-arm/package.json').version
|
||||
if (bindingPackageVersion !== '4.1.17' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.17 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
if (bindingPackageVersion !== '4.1.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
||||
throw new Error(`Native binding package version mismatch, expected 4.1.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
||||
}
|
||||
return binding
|
||||
} catch (e) {
|
||||
|
|
|
|||
30
node_modules/@tailwindcss/oxide/package.json
generated
vendored
30
node_modules/@tailwindcss/oxide/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@tailwindcss/oxide",
|
||||
"version": "4.1.17",
|
||||
"version": "4.1.18",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
|
||||
|
|
@ -34,8 +34,8 @@
|
|||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "^3.4.1",
|
||||
"@napi-rs/wasm-runtime": "^1.0.7",
|
||||
"emnapi": "1.6.0"
|
||||
"@napi-rs/wasm-runtime": "^1.1.0",
|
||||
"emnapi": "1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
|
|
@ -49,18 +49,18 @@
|
|||
"access": "public"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@tailwindcss/oxide-android-arm64": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-arm64-musl": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-x64-gnu": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-x64-musl": "4.1.17",
|
||||
"@tailwindcss/oxide-win32-arm64-msvc": "4.1.17",
|
||||
"@tailwindcss/oxide-freebsd-x64": "4.1.17",
|
||||
"@tailwindcss/oxide-linux-arm64-gnu": "4.1.17",
|
||||
"@tailwindcss/oxide-win32-x64-msvc": "4.1.17",
|
||||
"@tailwindcss/oxide-wasm32-wasi": "4.1.17",
|
||||
"@tailwindcss/oxide-darwin-x64": "4.1.17",
|
||||
"@tailwindcss/oxide-darwin-arm64": "4.1.17"
|
||||
"@tailwindcss/oxide-darwin-arm64": "4.1.18",
|
||||
"@tailwindcss/oxide-darwin-x64": "4.1.18",
|
||||
"@tailwindcss/oxide-freebsd-x64": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-arm64-musl": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-arm64-gnu": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-x64-gnu": "4.1.18",
|
||||
"@tailwindcss/oxide-linux-x64-musl": "4.1.18",
|
||||
"@tailwindcss/oxide-wasm32-wasi": "4.1.18",
|
||||
"@tailwindcss/oxide-win32-arm64-msvc": "4.1.18",
|
||||
"@tailwindcss/oxide-win32-x64-msvc": "4.1.18",
|
||||
"@tailwindcss/oxide-android-arm64": "4.1.18"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm run build:platform && pnpm run build:wasm",
|
||||
|
|
|
|||
21
node_modules/braces/LICENSE
generated
vendored
21
node_modules/braces/LICENSE
generated
vendored
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
586
node_modules/braces/README.md
generated
vendored
586
node_modules/braces/README.md
generated
vendored
|
|
@ -1,586 +0,0 @@
|
|||
# braces [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [](https://www.npmjs.com/package/braces) [](https://npmjs.org/package/braces) [](https://npmjs.org/package/braces) [](https://travis-ci.org/micromatch/braces)
|
||||
|
||||
> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save braces
|
||||
```
|
||||
|
||||
## v3.0.0 Released!!
|
||||
|
||||
See the [changelog](CHANGELOG.md) for details.
|
||||
|
||||
## Why use braces?
|
||||
|
||||
Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters.
|
||||
|
||||
- **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests)
|
||||
- **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity.
|
||||
- **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up.
|
||||
- **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written).
|
||||
- **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)).
|
||||
- [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']`
|
||||
- [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']`
|
||||
- [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']`
|
||||
- [Supports escaping](#escaping) - To prevent evaluation of special characters.
|
||||
|
||||
## Usage
|
||||
|
||||
The main export is a function that takes one or more brace `patterns` and `options`.
|
||||
|
||||
```js
|
||||
const braces = require('braces');
|
||||
// braces(patterns[, options]);
|
||||
|
||||
console.log(braces(['{01..05}', '{a..e}']));
|
||||
//=> ['(0[1-5])', '([a-e])']
|
||||
|
||||
console.log(braces(['{01..05}', '{a..e}'], { expand: true }));
|
||||
//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e']
|
||||
```
|
||||
|
||||
### Brace Expansion vs. Compilation
|
||||
|
||||
By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching.
|
||||
|
||||
**Compiled**
|
||||
|
||||
```js
|
||||
console.log(braces('a/{x,y,z}/b'));
|
||||
//=> ['a/(x|y|z)/b']
|
||||
console.log(braces(['a/{01..20}/b', 'a/{1..5}/b']));
|
||||
//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ]
|
||||
```
|
||||
|
||||
**Expanded**
|
||||
|
||||
Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)):
|
||||
|
||||
```js
|
||||
console.log(braces('a/{x,y,z}/b', { expand: true }));
|
||||
//=> ['a/x/b', 'a/y/b', 'a/z/b']
|
||||
|
||||
console.log(braces.expand('{01..10}'));
|
||||
//=> ['01','02','03','04','05','06','07','08','09','10']
|
||||
```
|
||||
|
||||
### Lists
|
||||
|
||||
Expand lists (like Bash "sets"):
|
||||
|
||||
```js
|
||||
console.log(braces('a/{foo,bar,baz}/*.js'));
|
||||
//=> ['a/(foo|bar|baz)/*.js']
|
||||
|
||||
console.log(braces.expand('a/{foo,bar,baz}/*.js'));
|
||||
//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js']
|
||||
```
|
||||
|
||||
### Sequences
|
||||
|
||||
Expand ranges of characters (like Bash "sequences"):
|
||||
|
||||
```js
|
||||
console.log(braces.expand('{1..3}')); // ['1', '2', '3']
|
||||
console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b']
|
||||
console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c']
|
||||
console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c']
|
||||
|
||||
// supports zero-padded ranges
|
||||
console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b']
|
||||
console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b']
|
||||
```
|
||||
|
||||
See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options.
|
||||
|
||||
### Steppped ranges
|
||||
|
||||
Steps, or increments, may be used with ranges:
|
||||
|
||||
```js
|
||||
console.log(braces.expand('{2..10..2}'));
|
||||
//=> ['2', '4', '6', '8', '10']
|
||||
|
||||
console.log(braces('{2..10..2}'));
|
||||
//=> ['(2|4|6|8|10)']
|
||||
```
|
||||
|
||||
When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion.
|
||||
|
||||
### Nesting
|
||||
|
||||
Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved.
|
||||
|
||||
**"Expanded" braces**
|
||||
|
||||
```js
|
||||
console.log(braces.expand('a{b,c,/{x,y}}/e'));
|
||||
//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e']
|
||||
|
||||
console.log(braces.expand('a/{x,{1..5},y}/c'));
|
||||
//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c']
|
||||
```
|
||||
|
||||
**"Optimized" braces**
|
||||
|
||||
```js
|
||||
console.log(braces('a{b,c,/{x,y}}/e'));
|
||||
//=> ['a(b|c|/(x|y))/e']
|
||||
|
||||
console.log(braces('a/{x,{1..5},y}/c'));
|
||||
//=> ['a/(x|([1-5])|y)/c']
|
||||
```
|
||||
|
||||
### Escaping
|
||||
|
||||
**Escaping braces**
|
||||
|
||||
A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_:
|
||||
|
||||
```js
|
||||
console.log(braces.expand('a\\{d,c,b}e'));
|
||||
//=> ['a{d,c,b}e']
|
||||
|
||||
console.log(braces.expand('a{d,c,b\\}e'));
|
||||
//=> ['a{d,c,b}e']
|
||||
```
|
||||
|
||||
**Escaping commas**
|
||||
|
||||
Commas inside braces may also be escaped:
|
||||
|
||||
```js
|
||||
console.log(braces.expand('a{b\\,c}d'));
|
||||
//=> ['a{b,c}d']
|
||||
|
||||
console.log(braces.expand('a{d\\,c,b}e'));
|
||||
//=> ['ad,ce', 'abe']
|
||||
```
|
||||
|
||||
**Single items**
|
||||
|
||||
Following bash conventions, a brace pattern is also not expanded when it contains a single character:
|
||||
|
||||
```js
|
||||
console.log(braces.expand('a{b}c'));
|
||||
//=> ['a{b}c']
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### options.maxLength
|
||||
|
||||
**Type**: `Number`
|
||||
|
||||
**Default**: `10,000`
|
||||
|
||||
**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera.
|
||||
|
||||
```js
|
||||
console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error
|
||||
```
|
||||
|
||||
### options.expand
|
||||
|
||||
**Type**: `Boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing).
|
||||
|
||||
```js
|
||||
console.log(braces('a/{b,c}/d', { expand: true }));
|
||||
//=> [ 'a/b/d', 'a/c/d' ]
|
||||
```
|
||||
|
||||
### options.nodupes
|
||||
|
||||
**Type**: `Boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**: Remove duplicates from the returned array.
|
||||
|
||||
### options.rangeLimit
|
||||
|
||||
**Type**: `Number`
|
||||
|
||||
**Default**: `1000`
|
||||
|
||||
**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`.
|
||||
|
||||
You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether.
|
||||
|
||||
**Examples**
|
||||
|
||||
```js
|
||||
// pattern exceeds the "rangeLimit", so it's optimized automatically
|
||||
console.log(braces.expand('{1..1000}'));
|
||||
//=> ['([1-9]|[1-9][0-9]{1,2}|1000)']
|
||||
|
||||
// pattern does not exceed "rangeLimit", so it's NOT optimized
|
||||
console.log(braces.expand('{1..100}'));
|
||||
//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100']
|
||||
```
|
||||
|
||||
### options.transform
|
||||
|
||||
**Type**: `Function`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**: Customize range expansion.
|
||||
|
||||
**Example: Transforming non-numeric values**
|
||||
|
||||
```js
|
||||
const alpha = braces.expand('x/{a..e}/y', {
|
||||
transform(value, index) {
|
||||
// When non-numeric values are passed, "value" is a character code.
|
||||
return 'foo/' + String.fromCharCode(value) + '-' + index;
|
||||
},
|
||||
});
|
||||
console.log(alpha);
|
||||
//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ]
|
||||
```
|
||||
|
||||
**Example: Transforming numeric values**
|
||||
|
||||
```js
|
||||
const numeric = braces.expand('{1..5}', {
|
||||
transform(value) {
|
||||
// when numeric values are passed, "value" is a number
|
||||
return 'foo/' + value * 2;
|
||||
},
|
||||
});
|
||||
console.log(numeric);
|
||||
//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ]
|
||||
```
|
||||
|
||||
### options.quantifiers
|
||||
|
||||
**Type**: `Boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times.
|
||||
|
||||
Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists)
|
||||
|
||||
The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists.
|
||||
|
||||
**Examples**
|
||||
|
||||
```js
|
||||
const braces = require('braces');
|
||||
console.log(braces('a/b{1,3}/{x,y,z}'));
|
||||
//=> [ 'a/b(1|3)/(x|y|z)' ]
|
||||
console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true }));
|
||||
//=> [ 'a/b{1,3}/(x|y|z)' ]
|
||||
console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true, expand: true }));
|
||||
//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ]
|
||||
```
|
||||
|
||||
### options.keepEscaping
|
||||
|
||||
**Type**: `Boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**: Do not strip backslashes that were used for escaping from the result.
|
||||
|
||||
## What is "brace expansion"?
|
||||
|
||||
Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs).
|
||||
|
||||
In addition to "expansion", braces are also used for matching. In other words:
|
||||
|
||||
- [brace expansion](#brace-expansion) is for generating new lists
|
||||
- [brace matching](#brace-matching) is for filtering existing lists
|
||||
|
||||
<details>
|
||||
<summary><strong>More about brace expansion</strong> (click to expand)</summary>
|
||||
|
||||
There are two main types of brace expansion:
|
||||
|
||||
1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}`
|
||||
2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges".
|
||||
|
||||
Here are some example brace patterns to illustrate how they work:
|
||||
|
||||
**Sets**
|
||||
|
||||
```
|
||||
{a,b,c} => a b c
|
||||
{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2
|
||||
```
|
||||
|
||||
**Sequences**
|
||||
|
||||
```
|
||||
{1..9} => 1 2 3 4 5 6 7 8 9
|
||||
{4..-4} => 4 3 2 1 0 -1 -2 -3 -4
|
||||
{1..20..3} => 1 4 7 10 13 16 19
|
||||
{a..j} => a b c d e f g h i j
|
||||
{j..a} => j i h g f e d c b a
|
||||
{a..z..3} => a d g j m p s v y
|
||||
```
|
||||
|
||||
**Combination**
|
||||
|
||||
Sets and sequences can be mixed together or used along with any other strings.
|
||||
|
||||
```
|
||||
{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3
|
||||
foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar
|
||||
```
|
||||
|
||||
The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases.
|
||||
|
||||
## Brace matching
|
||||
|
||||
In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching.
|
||||
|
||||
For example, the pattern `foo/{1..3}/bar` would match any of following strings:
|
||||
|
||||
```
|
||||
foo/1/bar
|
||||
foo/2/bar
|
||||
foo/3/bar
|
||||
```
|
||||
|
||||
But not:
|
||||
|
||||
```
|
||||
baz/1/qux
|
||||
baz/2/qux
|
||||
baz/3/qux
|
||||
```
|
||||
|
||||
Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings:
|
||||
|
||||
```
|
||||
foo/1/bar
|
||||
foo/2/bar
|
||||
foo/3/bar
|
||||
baz/1/qux
|
||||
baz/2/qux
|
||||
baz/3/qux
|
||||
```
|
||||
|
||||
## Brace matching pitfalls
|
||||
|
||||
Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of.
|
||||
|
||||
### tldr
|
||||
|
||||
**"brace bombs"**
|
||||
|
||||
- brace expansion can eat up a huge amount of processing resources
|
||||
- as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially
|
||||
- users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!)
|
||||
|
||||
For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section.
|
||||
|
||||
### The solution
|
||||
|
||||
Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries.
|
||||
|
||||
### Geometric complexity
|
||||
|
||||
At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`.
|
||||
|
||||
For example, the following sets demonstrate quadratic (`O(n^2)`) complexity:
|
||||
|
||||
```
|
||||
{1,2}{3,4} => (2X2) => 13 14 23 24
|
||||
{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246
|
||||
```
|
||||
|
||||
But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity:
|
||||
|
||||
```
|
||||
{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248
|
||||
249 257 258 259 267 268 269 347 348 349 357
|
||||
358 359 367 368 369
|
||||
```
|
||||
|
||||
Now, imagine how this complexity grows given that each element is a n-tuple:
|
||||
|
||||
```
|
||||
{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB)
|
||||
{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB)
|
||||
```
|
||||
|
||||
Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control.
|
||||
|
||||
**More information**
|
||||
|
||||
Interested in learning more about brace expansion?
|
||||
|
||||
- [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion)
|
||||
- [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion)
|
||||
- [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product)
|
||||
|
||||
</details>
|
||||
|
||||
## Performance
|
||||
|
||||
Braces is not only screaming fast, it's also more accurate the other brace expansion libraries.
|
||||
|
||||
### Better algorithms
|
||||
|
||||
Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_.
|
||||
|
||||
Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently.
|
||||
|
||||
**The proof is in the numbers**
|
||||
|
||||
Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively.
|
||||
|
||||
| **Pattern** | **braces** | **[minimatch][]** |
|
||||
| --------------------------- | ------------------- | ---------------------------- |
|
||||
| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs) | N/A (freezes) |
|
||||
| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) |
|
||||
| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) |
|
||||
| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) |
|
||||
| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) |
|
||||
| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) |
|
||||
| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) |
|
||||
| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) |
|
||||
| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) |
|
||||
| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) |
|
||||
| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) |
|
||||
| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) |
|
||||
| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) |
|
||||
| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) |
|
||||
| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) |
|
||||
| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) |
|
||||
| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) |
|
||||
|
||||
### Faster algorithms
|
||||
|
||||
When you need expansion, braces is still much faster.
|
||||
|
||||
_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_
|
||||
|
||||
| **Pattern** | **braces** | **[minimatch][]** |
|
||||
| --------------- | --------------------------- | ---------------------------- |
|
||||
| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) |
|
||||
| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) |
|
||||
| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) |
|
||||
| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) |
|
||||
| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) |
|
||||
| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) |
|
||||
| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) |
|
||||
| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) |
|
||||
|
||||
If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js).
|
||||
|
||||
## Benchmarks
|
||||
|
||||
### Running benchmarks
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```bash
|
||||
npm i -d && npm benchmark
|
||||
```
|
||||
|
||||
### Latest results
|
||||
|
||||
Braces is more accurate, without sacrificing performance.
|
||||
|
||||
```bash
|
||||
● expand - range (expanded)
|
||||
braces x 53,167 ops/sec ±0.12% (102 runs sampled)
|
||||
minimatch x 11,378 ops/sec ±0.10% (102 runs sampled)
|
||||
● expand - range (optimized for regex)
|
||||
braces x 373,442 ops/sec ±0.04% (100 runs sampled)
|
||||
minimatch x 3,262 ops/sec ±0.18% (100 runs sampled)
|
||||
● expand - nested ranges (expanded)
|
||||
braces x 33,921 ops/sec ±0.09% (99 runs sampled)
|
||||
minimatch x 10,855 ops/sec ±0.28% (100 runs sampled)
|
||||
● expand - nested ranges (optimized for regex)
|
||||
braces x 287,479 ops/sec ±0.52% (98 runs sampled)
|
||||
minimatch x 3,219 ops/sec ±0.28% (101 runs sampled)
|
||||
● expand - set (expanded)
|
||||
braces x 238,243 ops/sec ±0.19% (97 runs sampled)
|
||||
minimatch x 538,268 ops/sec ±0.31% (96 runs sampled)
|
||||
● expand - set (optimized for regex)
|
||||
braces x 321,844 ops/sec ±0.10% (97 runs sampled)
|
||||
minimatch x 140,600 ops/sec ±0.15% (100 runs sampled)
|
||||
● expand - nested sets (expanded)
|
||||
braces x 165,371 ops/sec ±0.42% (96 runs sampled)
|
||||
minimatch x 337,720 ops/sec ±0.28% (100 runs sampled)
|
||||
● expand - nested sets (optimized for regex)
|
||||
braces x 242,948 ops/sec ±0.12% (99 runs sampled)
|
||||
minimatch x 87,403 ops/sec ±0.79% (96 runs sampled)
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| ----------- | ------------------------------------------------------------- |
|
||||
| 197 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 4 | [doowb](https://github.com/doowb) |
|
||||
| 1 | [es128](https://github.com/es128) |
|
||||
| 1 | [eush77](https://github.com/eush77) |
|
||||
| 1 | [hemanth](https://github.com/hemanth) |
|
||||
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
- [GitHub Profile](https://github.com/jonschlinkert)
|
||||
- [Twitter Profile](https://twitter.com/jonschlinkert)
|
||||
- [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
---
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._
|
||||
170
node_modules/braces/index.js
generated
vendored
170
node_modules/braces/index.js
generated
vendored
|
|
@ -1,170 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const stringify = require('./lib/stringify');
|
||||
const compile = require('./lib/compile');
|
||||
const expand = require('./lib/expand');
|
||||
const parse = require('./lib/parse');
|
||||
|
||||
/**
|
||||
* Expand the given pattern or create a regex-compatible string.
|
||||
*
|
||||
* ```js
|
||||
* const braces = require('braces');
|
||||
* console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
|
||||
* console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
|
||||
* ```
|
||||
* @param {String} `str`
|
||||
* @param {Object} `options`
|
||||
* @return {String}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
const braces = (input, options = {}) => {
|
||||
let output = [];
|
||||
|
||||
if (Array.isArray(input)) {
|
||||
for (const pattern of input) {
|
||||
const result = braces.create(pattern, options);
|
||||
if (Array.isArray(result)) {
|
||||
output.push(...result);
|
||||
} else {
|
||||
output.push(result);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
output = [].concat(braces.create(input, options));
|
||||
}
|
||||
|
||||
if (options && options.expand === true && options.nodupes === true) {
|
||||
output = [...new Set(output)];
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse the given `str` with the given `options`.
|
||||
*
|
||||
* ```js
|
||||
* // braces.parse(pattern, [, options]);
|
||||
* const ast = braces.parse('a/{b,c}/d');
|
||||
* console.log(ast);
|
||||
* ```
|
||||
* @param {String} pattern Brace pattern to parse
|
||||
* @param {Object} options
|
||||
* @return {Object} Returns an AST
|
||||
* @api public
|
||||
*/
|
||||
|
||||
braces.parse = (input, options = {}) => parse(input, options);
|
||||
|
||||
/**
|
||||
* Creates a braces string from an AST, or an AST node.
|
||||
*
|
||||
* ```js
|
||||
* const braces = require('braces');
|
||||
* let ast = braces.parse('foo/{a,b}/bar');
|
||||
* console.log(stringify(ast.nodes[2])); //=> '{a,b}'
|
||||
* ```
|
||||
* @param {String} `input` Brace pattern or AST.
|
||||
* @param {Object} `options`
|
||||
* @return {Array} Returns an array of expanded values.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
braces.stringify = (input, options = {}) => {
|
||||
if (typeof input === 'string') {
|
||||
return stringify(braces.parse(input, options), options);
|
||||
}
|
||||
return stringify(input, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Compiles a brace pattern into a regex-compatible, optimized string.
|
||||
* This method is called by the main [braces](#braces) function by default.
|
||||
*
|
||||
* ```js
|
||||
* const braces = require('braces');
|
||||
* console.log(braces.compile('a/{b,c}/d'));
|
||||
* //=> ['a/(b|c)/d']
|
||||
* ```
|
||||
* @param {String} `input` Brace pattern or AST.
|
||||
* @param {Object} `options`
|
||||
* @return {Array} Returns an array of expanded values.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
braces.compile = (input, options = {}) => {
|
||||
if (typeof input === 'string') {
|
||||
input = braces.parse(input, options);
|
||||
}
|
||||
return compile(input, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Expands a brace pattern into an array. This method is called by the
|
||||
* main [braces](#braces) function when `options.expand` is true. Before
|
||||
* using this method it's recommended that you read the [performance notes](#performance))
|
||||
* and advantages of using [.compile](#compile) instead.
|
||||
*
|
||||
* ```js
|
||||
* const braces = require('braces');
|
||||
* console.log(braces.expand('a/{b,c}/d'));
|
||||
* //=> ['a/b/d', 'a/c/d'];
|
||||
* ```
|
||||
* @param {String} `pattern` Brace pattern
|
||||
* @param {Object} `options`
|
||||
* @return {Array} Returns an array of expanded values.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
braces.expand = (input, options = {}) => {
|
||||
if (typeof input === 'string') {
|
||||
input = braces.parse(input, options);
|
||||
}
|
||||
|
||||
let result = expand(input, options);
|
||||
|
||||
// filter out empty strings if specified
|
||||
if (options.noempty === true) {
|
||||
result = result.filter(Boolean);
|
||||
}
|
||||
|
||||
// filter out duplicates if specified
|
||||
if (options.nodupes === true) {
|
||||
result = [...new Set(result)];
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Processes a brace pattern and returns either an expanded array
|
||||
* (if `options.expand` is true), a highly optimized regex-compatible string.
|
||||
* This method is called by the main [braces](#braces) function.
|
||||
*
|
||||
* ```js
|
||||
* const braces = require('braces');
|
||||
* console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
|
||||
* //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
|
||||
* ```
|
||||
* @param {String} `pattern` Brace pattern
|
||||
* @param {Object} `options`
|
||||
* @return {Array} Returns an array of expanded values.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
braces.create = (input, options = {}) => {
|
||||
if (input === '' || input.length < 3) {
|
||||
return [input];
|
||||
}
|
||||
|
||||
return options.expand !== true
|
||||
? braces.compile(input, options)
|
||||
: braces.expand(input, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Expose "braces"
|
||||
*/
|
||||
|
||||
module.exports = braces;
|
||||
60
node_modules/braces/lib/compile.js
generated
vendored
60
node_modules/braces/lib/compile.js
generated
vendored
|
|
@ -1,60 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const fill = require('fill-range');
|
||||
const utils = require('./utils');
|
||||
|
||||
const compile = (ast, options = {}) => {
|
||||
const walk = (node, parent = {}) => {
|
||||
const invalidBlock = utils.isInvalidBrace(parent);
|
||||
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
||||
const invalid = invalidBlock === true || invalidNode === true;
|
||||
const prefix = options.escapeInvalid === true ? '\\' : '';
|
||||
let output = '';
|
||||
|
||||
if (node.isOpen === true) {
|
||||
return prefix + node.value;
|
||||
}
|
||||
|
||||
if (node.isClose === true) {
|
||||
console.log('node.isClose', prefix, node.value);
|
||||
return prefix + node.value;
|
||||
}
|
||||
|
||||
if (node.type === 'open') {
|
||||
return invalid ? prefix + node.value : '(';
|
||||
}
|
||||
|
||||
if (node.type === 'close') {
|
||||
return invalid ? prefix + node.value : ')';
|
||||
}
|
||||
|
||||
if (node.type === 'comma') {
|
||||
return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';
|
||||
}
|
||||
|
||||
if (node.value) {
|
||||
return node.value;
|
||||
}
|
||||
|
||||
if (node.nodes && node.ranges > 0) {
|
||||
const args = utils.reduce(node.nodes);
|
||||
const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
|
||||
|
||||
if (range.length !== 0) {
|
||||
return args.length > 1 && range.length > 1 ? `(${range})` : range;
|
||||
}
|
||||
}
|
||||
|
||||
if (node.nodes) {
|
||||
for (const child of node.nodes) {
|
||||
output += walk(child, node);
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
return walk(ast);
|
||||
};
|
||||
|
||||
module.exports = compile;
|
||||
57
node_modules/braces/lib/constants.js
generated
vendored
57
node_modules/braces/lib/constants.js
generated
vendored
|
|
@ -1,57 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
MAX_LENGTH: 10000,
|
||||
|
||||
// Digits
|
||||
CHAR_0: '0', /* 0 */
|
||||
CHAR_9: '9', /* 9 */
|
||||
|
||||
// Alphabet chars.
|
||||
CHAR_UPPERCASE_A: 'A', /* A */
|
||||
CHAR_LOWERCASE_A: 'a', /* a */
|
||||
CHAR_UPPERCASE_Z: 'Z', /* Z */
|
||||
CHAR_LOWERCASE_Z: 'z', /* z */
|
||||
|
||||
CHAR_LEFT_PARENTHESES: '(', /* ( */
|
||||
CHAR_RIGHT_PARENTHESES: ')', /* ) */
|
||||
|
||||
CHAR_ASTERISK: '*', /* * */
|
||||
|
||||
// Non-alphabetic chars.
|
||||
CHAR_AMPERSAND: '&', /* & */
|
||||
CHAR_AT: '@', /* @ */
|
||||
CHAR_BACKSLASH: '\\', /* \ */
|
||||
CHAR_BACKTICK: '`', /* ` */
|
||||
CHAR_CARRIAGE_RETURN: '\r', /* \r */
|
||||
CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
|
||||
CHAR_COLON: ':', /* : */
|
||||
CHAR_COMMA: ',', /* , */
|
||||
CHAR_DOLLAR: '$', /* . */
|
||||
CHAR_DOT: '.', /* . */
|
||||
CHAR_DOUBLE_QUOTE: '"', /* " */
|
||||
CHAR_EQUAL: '=', /* = */
|
||||
CHAR_EXCLAMATION_MARK: '!', /* ! */
|
||||
CHAR_FORM_FEED: '\f', /* \f */
|
||||
CHAR_FORWARD_SLASH: '/', /* / */
|
||||
CHAR_HASH: '#', /* # */
|
||||
CHAR_HYPHEN_MINUS: '-', /* - */
|
||||
CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
|
||||
CHAR_LEFT_CURLY_BRACE: '{', /* { */
|
||||
CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
|
||||
CHAR_LINE_FEED: '\n', /* \n */
|
||||
CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
|
||||
CHAR_PERCENT: '%', /* % */
|
||||
CHAR_PLUS: '+', /* + */
|
||||
CHAR_QUESTION_MARK: '?', /* ? */
|
||||
CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
|
||||
CHAR_RIGHT_CURLY_BRACE: '}', /* } */
|
||||
CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
|
||||
CHAR_SEMICOLON: ';', /* ; */
|
||||
CHAR_SINGLE_QUOTE: '\'', /* ' */
|
||||
CHAR_SPACE: ' ', /* */
|
||||
CHAR_TAB: '\t', /* \t */
|
||||
CHAR_UNDERSCORE: '_', /* _ */
|
||||
CHAR_VERTICAL_LINE: '|', /* | */
|
||||
CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
|
||||
};
|
||||
113
node_modules/braces/lib/expand.js
generated
vendored
113
node_modules/braces/lib/expand.js
generated
vendored
|
|
@ -1,113 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const fill = require('fill-range');
|
||||
const stringify = require('./stringify');
|
||||
const utils = require('./utils');
|
||||
|
||||
const append = (queue = '', stash = '', enclose = false) => {
|
||||
const result = [];
|
||||
|
||||
queue = [].concat(queue);
|
||||
stash = [].concat(stash);
|
||||
|
||||
if (!stash.length) return queue;
|
||||
if (!queue.length) {
|
||||
return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
|
||||
}
|
||||
|
||||
for (const item of queue) {
|
||||
if (Array.isArray(item)) {
|
||||
for (const value of item) {
|
||||
result.push(append(value, stash, enclose));
|
||||
}
|
||||
} else {
|
||||
for (let ele of stash) {
|
||||
if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
|
||||
result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
|
||||
}
|
||||
}
|
||||
}
|
||||
return utils.flatten(result);
|
||||
};
|
||||
|
||||
const expand = (ast, options = {}) => {
|
||||
const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;
|
||||
|
||||
const walk = (node, parent = {}) => {
|
||||
node.queue = [];
|
||||
|
||||
let p = parent;
|
||||
let q = parent.queue;
|
||||
|
||||
while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
|
||||
p = p.parent;
|
||||
q = p.queue;
|
||||
}
|
||||
|
||||
if (node.invalid || node.dollar) {
|
||||
q.push(append(q.pop(), stringify(node, options)));
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
|
||||
q.push(append(q.pop(), ['{}']));
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.nodes && node.ranges > 0) {
|
||||
const args = utils.reduce(node.nodes);
|
||||
|
||||
if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
|
||||
throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
|
||||
}
|
||||
|
||||
let range = fill(...args, options);
|
||||
if (range.length === 0) {
|
||||
range = stringify(node, options);
|
||||
}
|
||||
|
||||
q.push(append(q.pop(), range));
|
||||
node.nodes = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const enclose = utils.encloseBrace(node);
|
||||
let queue = node.queue;
|
||||
let block = node;
|
||||
|
||||
while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
|
||||
block = block.parent;
|
||||
queue = block.queue;
|
||||
}
|
||||
|
||||
for (let i = 0; i < node.nodes.length; i++) {
|
||||
const child = node.nodes[i];
|
||||
|
||||
if (child.type === 'comma' && node.type === 'brace') {
|
||||
if (i === 1) queue.push('');
|
||||
queue.push('');
|
||||
continue;
|
||||
}
|
||||
|
||||
if (child.type === 'close') {
|
||||
q.push(append(q.pop(), queue, enclose));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (child.value && child.type !== 'open') {
|
||||
queue.push(append(queue.pop(), child.value));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (child.nodes) {
|
||||
walk(child, node);
|
||||
}
|
||||
}
|
||||
|
||||
return queue;
|
||||
};
|
||||
|
||||
return utils.flatten(walk(ast));
|
||||
};
|
||||
|
||||
module.exports = expand;
|
||||
331
node_modules/braces/lib/parse.js
generated
vendored
331
node_modules/braces/lib/parse.js
generated
vendored
|
|
@ -1,331 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const stringify = require('./stringify');
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
|
||||
const {
|
||||
MAX_LENGTH,
|
||||
CHAR_BACKSLASH, /* \ */
|
||||
CHAR_BACKTICK, /* ` */
|
||||
CHAR_COMMA, /* , */
|
||||
CHAR_DOT, /* . */
|
||||
CHAR_LEFT_PARENTHESES, /* ( */
|
||||
CHAR_RIGHT_PARENTHESES, /* ) */
|
||||
CHAR_LEFT_CURLY_BRACE, /* { */
|
||||
CHAR_RIGHT_CURLY_BRACE, /* } */
|
||||
CHAR_LEFT_SQUARE_BRACKET, /* [ */
|
||||
CHAR_RIGHT_SQUARE_BRACKET, /* ] */
|
||||
CHAR_DOUBLE_QUOTE, /* " */
|
||||
CHAR_SINGLE_QUOTE, /* ' */
|
||||
CHAR_NO_BREAK_SPACE,
|
||||
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
||||
} = require('./constants');
|
||||
|
||||
/**
|
||||
* parse
|
||||
*/
|
||||
|
||||
const parse = (input, options = {}) => {
|
||||
if (typeof input !== 'string') {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
const opts = options || {};
|
||||
const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
||||
if (input.length > max) {
|
||||
throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
||||
}
|
||||
|
||||
const ast = { type: 'root', input, nodes: [] };
|
||||
const stack = [ast];
|
||||
let block = ast;
|
||||
let prev = ast;
|
||||
let brackets = 0;
|
||||
const length = input.length;
|
||||
let index = 0;
|
||||
let depth = 0;
|
||||
let value;
|
||||
|
||||
/**
|
||||
* Helpers
|
||||
*/
|
||||
|
||||
const advance = () => input[index++];
|
||||
const push = node => {
|
||||
if (node.type === 'text' && prev.type === 'dot') {
|
||||
prev.type = 'text';
|
||||
}
|
||||
|
||||
if (prev && prev.type === 'text' && node.type === 'text') {
|
||||
prev.value += node.value;
|
||||
return;
|
||||
}
|
||||
|
||||
block.nodes.push(node);
|
||||
node.parent = block;
|
||||
node.prev = prev;
|
||||
prev = node;
|
||||
return node;
|
||||
};
|
||||
|
||||
push({ type: 'bos' });
|
||||
|
||||
while (index < length) {
|
||||
block = stack[stack.length - 1];
|
||||
value = advance();
|
||||
|
||||
/**
|
||||
* Invalid chars
|
||||
*/
|
||||
|
||||
if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Escaped chars
|
||||
*/
|
||||
|
||||
if (value === CHAR_BACKSLASH) {
|
||||
push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Right square bracket (literal): ']'
|
||||
*/
|
||||
|
||||
if (value === CHAR_RIGHT_SQUARE_BRACKET) {
|
||||
push({ type: 'text', value: '\\' + value });
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Left square bracket: '['
|
||||
*/
|
||||
|
||||
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
||||
brackets++;
|
||||
|
||||
let next;
|
||||
|
||||
while (index < length && (next = advance())) {
|
||||
value += next;
|
||||
|
||||
if (next === CHAR_LEFT_SQUARE_BRACKET) {
|
||||
brackets++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (next === CHAR_BACKSLASH) {
|
||||
value += advance();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
|
||||
brackets--;
|
||||
|
||||
if (brackets === 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
push({ type: 'text', value });
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parentheses
|
||||
*/
|
||||
|
||||
if (value === CHAR_LEFT_PARENTHESES) {
|
||||
block = push({ type: 'paren', nodes: [] });
|
||||
stack.push(block);
|
||||
push({ type: 'text', value });
|
||||
continue;
|
||||
}
|
||||
|
||||
if (value === CHAR_RIGHT_PARENTHESES) {
|
||||
if (block.type !== 'paren') {
|
||||
push({ type: 'text', value });
|
||||
continue;
|
||||
}
|
||||
block = stack.pop();
|
||||
push({ type: 'text', value });
|
||||
block = stack[stack.length - 1];
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Quotes: '|"|`
|
||||
*/
|
||||
|
||||
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
||||
const open = value;
|
||||
let next;
|
||||
|
||||
if (options.keepQuotes !== true) {
|
||||
value = '';
|
||||
}
|
||||
|
||||
while (index < length && (next = advance())) {
|
||||
if (next === CHAR_BACKSLASH) {
|
||||
value += next + advance();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (next === open) {
|
||||
if (options.keepQuotes === true) value += next;
|
||||
break;
|
||||
}
|
||||
|
||||
value += next;
|
||||
}
|
||||
|
||||
push({ type: 'text', value });
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Left curly brace: '{'
|
||||
*/
|
||||
|
||||
if (value === CHAR_LEFT_CURLY_BRACE) {
|
||||
depth++;
|
||||
|
||||
const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
|
||||
const brace = {
|
||||
type: 'brace',
|
||||
open: true,
|
||||
close: false,
|
||||
dollar,
|
||||
depth,
|
||||
commas: 0,
|
||||
ranges: 0,
|
||||
nodes: []
|
||||
};
|
||||
|
||||
block = push(brace);
|
||||
stack.push(block);
|
||||
push({ type: 'open', value });
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Right curly brace: '}'
|
||||
*/
|
||||
|
||||
if (value === CHAR_RIGHT_CURLY_BRACE) {
|
||||
if (block.type !== 'brace') {
|
||||
push({ type: 'text', value });
|
||||
continue;
|
||||
}
|
||||
|
||||
const type = 'close';
|
||||
block = stack.pop();
|
||||
block.close = true;
|
||||
|
||||
push({ type, value });
|
||||
depth--;
|
||||
|
||||
block = stack[stack.length - 1];
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comma: ','
|
||||
*/
|
||||
|
||||
if (value === CHAR_COMMA && depth > 0) {
|
||||
if (block.ranges > 0) {
|
||||
block.ranges = 0;
|
||||
const open = block.nodes.shift();
|
||||
block.nodes = [open, { type: 'text', value: stringify(block) }];
|
||||
}
|
||||
|
||||
push({ type: 'comma', value });
|
||||
block.commas++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dot: '.'
|
||||
*/
|
||||
|
||||
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
|
||||
const siblings = block.nodes;
|
||||
|
||||
if (depth === 0 || siblings.length === 0) {
|
||||
push({ type: 'text', value });
|
||||
continue;
|
||||
}
|
||||
|
||||
if (prev.type === 'dot') {
|
||||
block.range = [];
|
||||
prev.value += value;
|
||||
prev.type = 'range';
|
||||
|
||||
if (block.nodes.length !== 3 && block.nodes.length !== 5) {
|
||||
block.invalid = true;
|
||||
block.ranges = 0;
|
||||
prev.type = 'text';
|
||||
continue;
|
||||
}
|
||||
|
||||
block.ranges++;
|
||||
block.args = [];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (prev.type === 'range') {
|
||||
siblings.pop();
|
||||
|
||||
const before = siblings[siblings.length - 1];
|
||||
before.value += prev.value + value;
|
||||
prev = before;
|
||||
block.ranges--;
|
||||
continue;
|
||||
}
|
||||
|
||||
push({ type: 'dot', value });
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Text
|
||||
*/
|
||||
|
||||
push({ type: 'text', value });
|
||||
}
|
||||
|
||||
// Mark imbalanced braces and brackets as invalid
|
||||
do {
|
||||
block = stack.pop();
|
||||
|
||||
if (block.type !== 'root') {
|
||||
block.nodes.forEach(node => {
|
||||
if (!node.nodes) {
|
||||
if (node.type === 'open') node.isOpen = true;
|
||||
if (node.type === 'close') node.isClose = true;
|
||||
if (!node.nodes) node.type = 'text';
|
||||
node.invalid = true;
|
||||
}
|
||||
});
|
||||
|
||||
// get the location of the block on parent.nodes (block's siblings)
|
||||
const parent = stack[stack.length - 1];
|
||||
const index = parent.nodes.indexOf(block);
|
||||
// replace the (invalid) block with it's nodes
|
||||
parent.nodes.splice(index, 1, ...block.nodes);
|
||||
}
|
||||
} while (stack.length > 0);
|
||||
|
||||
push({ type: 'eos' });
|
||||
return ast;
|
||||
};
|
||||
|
||||
module.exports = parse;
|
||||
32
node_modules/braces/lib/stringify.js
generated
vendored
32
node_modules/braces/lib/stringify.js
generated
vendored
|
|
@ -1,32 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const utils = require('./utils');
|
||||
|
||||
module.exports = (ast, options = {}) => {
|
||||
const stringify = (node, parent = {}) => {
|
||||
const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
|
||||
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
||||
let output = '';
|
||||
|
||||
if (node.value) {
|
||||
if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
|
||||
return '\\' + node.value;
|
||||
}
|
||||
return node.value;
|
||||
}
|
||||
|
||||
if (node.value) {
|
||||
return node.value;
|
||||
}
|
||||
|
||||
if (node.nodes) {
|
||||
for (const child of node.nodes) {
|
||||
output += stringify(child);
|
||||
}
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
return stringify(ast);
|
||||
};
|
||||
|
||||
122
node_modules/braces/lib/utils.js
generated
vendored
122
node_modules/braces/lib/utils.js
generated
vendored
|
|
@ -1,122 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
exports.isInteger = num => {
|
||||
if (typeof num === 'number') {
|
||||
return Number.isInteger(num);
|
||||
}
|
||||
if (typeof num === 'string' && num.trim() !== '') {
|
||||
return Number.isInteger(Number(num));
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Find a node of the given type
|
||||
*/
|
||||
|
||||
exports.find = (node, type) => node.nodes.find(node => node.type === type);
|
||||
|
||||
/**
|
||||
* Find a node of the given type
|
||||
*/
|
||||
|
||||
exports.exceedsLimit = (min, max, step = 1, limit) => {
|
||||
if (limit === false) return false;
|
||||
if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
|
||||
return ((Number(max) - Number(min)) / Number(step)) >= limit;
|
||||
};
|
||||
|
||||
/**
|
||||
* Escape the given node with '\\' before node.value
|
||||
*/
|
||||
|
||||
exports.escapeNode = (block, n = 0, type) => {
|
||||
const node = block.nodes[n];
|
||||
if (!node) return;
|
||||
|
||||
if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
|
||||
if (node.escaped !== true) {
|
||||
node.value = '\\' + node.value;
|
||||
node.escaped = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the given brace node should be enclosed in literal braces
|
||||
*/
|
||||
|
||||
exports.encloseBrace = node => {
|
||||
if (node.type !== 'brace') return false;
|
||||
if ((node.commas >> 0 + node.ranges >> 0) === 0) {
|
||||
node.invalid = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if a brace node is invalid.
|
||||
*/
|
||||
|
||||
exports.isInvalidBrace = block => {
|
||||
if (block.type !== 'brace') return false;
|
||||
if (block.invalid === true || block.dollar) return true;
|
||||
if ((block.commas >> 0 + block.ranges >> 0) === 0) {
|
||||
block.invalid = true;
|
||||
return true;
|
||||
}
|
||||
if (block.open !== true || block.close !== true) {
|
||||
block.invalid = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if a node is an open or close node
|
||||
*/
|
||||
|
||||
exports.isOpenOrClose = node => {
|
||||
if (node.type === 'open' || node.type === 'close') {
|
||||
return true;
|
||||
}
|
||||
return node.open === true || node.close === true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Reduce an array of text nodes.
|
||||
*/
|
||||
|
||||
exports.reduce = nodes => nodes.reduce((acc, node) => {
|
||||
if (node.type === 'text') acc.push(node.value);
|
||||
if (node.type === 'range') node.type = 'text';
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
/**
|
||||
* Flatten an array
|
||||
*/
|
||||
|
||||
exports.flatten = (...args) => {
|
||||
const result = [];
|
||||
|
||||
const flat = arr => {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
const ele = arr[i];
|
||||
|
||||
if (Array.isArray(ele)) {
|
||||
flat(ele);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ele !== undefined) {
|
||||
result.push(ele);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
flat(args);
|
||||
return result;
|
||||
};
|
||||
77
node_modules/braces/package.json
generated
vendored
77
node_modules/braces/package.json
generated
vendored
|
|
@ -1,77 +0,0 @@
|
|||
{
|
||||
"name": "braces",
|
||||
"description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.",
|
||||
"version": "3.0.3",
|
||||
"homepage": "https://github.com/micromatch/braces",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Brian Woodward (https://twitter.com/doowb)",
|
||||
"Elan Shanker (https://github.com/es128)",
|
||||
"Eugene Sharygin (https://github.com/eush77)",
|
||||
"hemanth.hm (http://h3manth.com)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)"
|
||||
],
|
||||
"repository": "micromatch/braces",
|
||||
"bugs": {
|
||||
"url": "https://github.com/micromatch/braces/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js",
|
||||
"lib"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"benchmark": "node benchmark"
|
||||
},
|
||||
"dependencies": {
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ansi-colors": "^3.2.4",
|
||||
"bash-path": "^2.0.1",
|
||||
"gulp-format-md": "^2.0.0",
|
||||
"mocha": "^6.1.1"
|
||||
},
|
||||
"keywords": [
|
||||
"alpha",
|
||||
"alphabetical",
|
||||
"bash",
|
||||
"brace",
|
||||
"braces",
|
||||
"expand",
|
||||
"expansion",
|
||||
"filepath",
|
||||
"fill",
|
||||
"fs",
|
||||
"glob",
|
||||
"globbing",
|
||||
"letter",
|
||||
"match",
|
||||
"matches",
|
||||
"matching",
|
||||
"number",
|
||||
"numerical",
|
||||
"path",
|
||||
"range",
|
||||
"ranges",
|
||||
"sh"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
},
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
]
|
||||
}
|
||||
}
|
||||
7
node_modules/detect-libc/.npmignore
generated
vendored
7
node_modules/detect-libc/.npmignore
generated
vendored
|
|
@ -1,7 +0,0 @@
|
|||
.nyc_output
|
||||
.travis.yml
|
||||
coverage
|
||||
test.js
|
||||
node_modules
|
||||
/.circleci
|
||||
/tests/integration
|
||||
175
node_modules/detect-libc/README.md
generated
vendored
175
node_modules/detect-libc/README.md
generated
vendored
|
|
@ -1,16 +1,18 @@
|
|||
# detect-libc
|
||||
|
||||
Node.js module to detect the C standard library (libc) implementation
|
||||
family and version in use on a given Linux system.
|
||||
Node.js module to detect details of the C standard library (libc)
|
||||
implementation provided by a given Linux system.
|
||||
|
||||
Provides a value suitable for use with the `LIBC` option of
|
||||
[prebuild](https://www.npmjs.com/package/prebuild),
|
||||
[prebuild-ci](https://www.npmjs.com/package/prebuild-ci) and
|
||||
[prebuild-install](https://www.npmjs.com/package/prebuild-install),
|
||||
therefore allowing build and provision of pre-compiled binaries
|
||||
for musl-based Linux e.g. Alpine as well as glibc-based.
|
||||
Currently supports detection of GNU glibc and MUSL libc.
|
||||
|
||||
Currently supports libc detection of `glibc` and `musl`.
|
||||
Provides asychronous and synchronous functions for the
|
||||
family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`).
|
||||
|
||||
The version numbers of libc implementations
|
||||
are not guaranteed to be semver-compliant.
|
||||
|
||||
For previous v1.x releases, please see the
|
||||
[v1](https://github.com/lovell/detect-libc/tree/v1) branch.
|
||||
|
||||
## Install
|
||||
|
||||
|
|
@ -18,54 +20,137 @@ Currently supports libc detection of `glibc` and `musl`.
|
|||
npm install detect-libc
|
||||
```
|
||||
|
||||
## Usage
|
||||
## API
|
||||
|
||||
### API
|
||||
### GLIBC
|
||||
|
||||
```ts
|
||||
const GLIBC: string = 'glibc';
|
||||
```
|
||||
|
||||
A String constant containing the value `glibc`.
|
||||
|
||||
### MUSL
|
||||
|
||||
```ts
|
||||
const MUSL: string = 'musl';
|
||||
```
|
||||
|
||||
A String constant containing the value `musl`.
|
||||
|
||||
### family
|
||||
|
||||
```ts
|
||||
function family(): Promise<string | null>;
|
||||
```
|
||||
|
||||
Resolves asychronously with:
|
||||
|
||||
* `glibc` or `musl` when the libc family can be determined
|
||||
* `null` when the libc family cannot be determined
|
||||
* `null` when run on a non-Linux platform
|
||||
|
||||
```js
|
||||
const { GLIBC, MUSL, family, version, isNonGlibcLinux } = require('detect-libc');
|
||||
const { family, GLIBC, MUSL } = require('detect-libc');
|
||||
|
||||
switch (await family()) {
|
||||
case GLIBC: ...
|
||||
case MUSL: ...
|
||||
case null: ...
|
||||
}
|
||||
```
|
||||
|
||||
* `GLIBC` is a String containing the value "glibc" for comparison with `family`.
|
||||
* `MUSL` is a String containing the value "musl" for comparison with `family`.
|
||||
* `family` is a String representing the system libc family.
|
||||
* `version` is a String representing the system libc version number.
|
||||
* `isNonGlibcLinux` is a Boolean representing whether the system is a non-glibc Linux, e.g. Alpine.
|
||||
### familySync
|
||||
|
||||
### detect-libc command line tool
|
||||
|
||||
When run on a Linux system with a non-glibc libc,
|
||||
the child command will be run with the `LIBC` environment variable
|
||||
set to the relevant value.
|
||||
|
||||
On all other platforms will run the child command as-is.
|
||||
|
||||
The command line feature requires `spawnSync` provided by Node v0.12+.
|
||||
|
||||
```sh
|
||||
detect-libc child-command
|
||||
```ts
|
||||
function familySync(): string | null;
|
||||
```
|
||||
|
||||
## Integrating with prebuild
|
||||
Synchronous version of `family()`.
|
||||
|
||||
```json
|
||||
"scripts": {
|
||||
"install": "detect-libc prebuild-install || node-gyp rebuild",
|
||||
"test": "mocha && detect-libc prebuild-ci"
|
||||
},
|
||||
"dependencies": {
|
||||
"detect-libc": "^1.0.2",
|
||||
"prebuild-install": "^2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prebuild": "^6.2.1",
|
||||
"prebuild-ci": "^2.2.3"
|
||||
}
|
||||
```js
|
||||
const { familySync, GLIBC, MUSL } = require('detect-libc');
|
||||
|
||||
switch (familySync()) {
|
||||
case GLIBC: ...
|
||||
case MUSL: ...
|
||||
case null: ...
|
||||
}
|
||||
```
|
||||
|
||||
## Licence
|
||||
### version
|
||||
|
||||
Copyright 2017 Lovell Fuller
|
||||
```ts
|
||||
function version(): Promise<string | null>;
|
||||
```
|
||||
|
||||
Resolves asychronously with:
|
||||
|
||||
* The version when it can be determined
|
||||
* `null` when the libc family cannot be determined
|
||||
* `null` when run on a non-Linux platform
|
||||
|
||||
```js
|
||||
const { version } = require('detect-libc');
|
||||
|
||||
const v = await version();
|
||||
if (v) {
|
||||
const [major, minor, patch] = v.split('.');
|
||||
}
|
||||
```
|
||||
|
||||
### versionSync
|
||||
|
||||
```ts
|
||||
function versionSync(): string | null;
|
||||
```
|
||||
|
||||
Synchronous version of `version()`.
|
||||
|
||||
```js
|
||||
const { versionSync } = require('detect-libc');
|
||||
|
||||
const v = versionSync();
|
||||
if (v) {
|
||||
const [major, minor, patch] = v.split('.');
|
||||
}
|
||||
```
|
||||
|
||||
### isNonGlibcLinux
|
||||
|
||||
```ts
|
||||
function isNonGlibcLinux(): Promise<boolean>;
|
||||
```
|
||||
|
||||
Resolves asychronously with:
|
||||
|
||||
* `false` when the libc family is `glibc`
|
||||
* `true` when the libc family is not `glibc`
|
||||
* `false` when run on a non-Linux platform
|
||||
|
||||
```js
|
||||
const { isNonGlibcLinux } = require('detect-libc');
|
||||
|
||||
if (await isNonGlibcLinux()) { ... }
|
||||
```
|
||||
|
||||
### isNonGlibcLinuxSync
|
||||
|
||||
```ts
|
||||
function isNonGlibcLinuxSync(): boolean;
|
||||
```
|
||||
|
||||
Synchronous version of `isNonGlibcLinux()`.
|
||||
|
||||
```js
|
||||
const { isNonGlibcLinuxSync } = require('detect-libc');
|
||||
|
||||
if (isNonGlibcLinuxSync()) { ... }
|
||||
```
|
||||
|
||||
## Licensing
|
||||
|
||||
Copyright 2017 Lovell Fuller and others.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
18
node_modules/detect-libc/bin/detect-libc.js
generated
vendored
18
node_modules/detect-libc/bin/detect-libc.js
generated
vendored
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
var spawnSync = require('child_process').spawnSync;
|
||||
var libc = require('../');
|
||||
|
||||
var spawnOptions = {
|
||||
env: process.env,
|
||||
shell: true,
|
||||
stdio: 'inherit'
|
||||
};
|
||||
|
||||
if (libc.isNonGlibcLinux) {
|
||||
spawnOptions.env.LIBC = process.env.LIBC || libc.family;
|
||||
}
|
||||
|
||||
process.exit(spawnSync(process.argv[2], process.argv.slice(3), spawnOptions).status);
|
||||
365
node_modules/detect-libc/lib/detect-libc.js
generated
vendored
365
node_modules/detect-libc/lib/detect-libc.js
generated
vendored
|
|
@ -1,92 +1,313 @@
|
|||
// Copyright 2017 Lovell Fuller and others.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
'use strict';
|
||||
|
||||
var platform = require('os').platform();
|
||||
var spawnSync = require('child_process').spawnSync;
|
||||
var readdirSync = require('fs').readdirSync;
|
||||
const childProcess = require('child_process');
|
||||
const { isLinux, getReport } = require('./process');
|
||||
const { LDD_PATH, SELF_PATH, readFile, readFileSync } = require('./filesystem');
|
||||
const { interpreterPath } = require('./elf');
|
||||
|
||||
var GLIBC = 'glibc';
|
||||
var MUSL = 'musl';
|
||||
let cachedFamilyInterpreter;
|
||||
let cachedFamilyFilesystem;
|
||||
let cachedVersionFilesystem;
|
||||
|
||||
var spawnOptions = {
|
||||
encoding: 'utf8',
|
||||
env: process.env
|
||||
const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true';
|
||||
let commandOut = '';
|
||||
|
||||
const safeCommand = () => {
|
||||
if (!commandOut) {
|
||||
return new Promise((resolve) => {
|
||||
childProcess.exec(command, (err, out) => {
|
||||
commandOut = err ? ' ' : out;
|
||||
resolve(commandOut);
|
||||
});
|
||||
});
|
||||
}
|
||||
return commandOut;
|
||||
};
|
||||
|
||||
if (!spawnSync) {
|
||||
spawnSync = function () {
|
||||
return { status: 126, stdout: '', stderr: '' };
|
||||
};
|
||||
}
|
||||
const safeCommandSync = () => {
|
||||
if (!commandOut) {
|
||||
try {
|
||||
commandOut = childProcess.execSync(command, { encoding: 'utf8' });
|
||||
} catch (_err) {
|
||||
commandOut = ' ';
|
||||
}
|
||||
}
|
||||
return commandOut;
|
||||
};
|
||||
|
||||
function contains (needle) {
|
||||
return function (haystack) {
|
||||
return haystack.indexOf(needle) !== -1;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* A String constant containing the value `glibc`.
|
||||
* @type {string}
|
||||
* @public
|
||||
*/
|
||||
const GLIBC = 'glibc';
|
||||
|
||||
function versionFromMuslLdd (out) {
|
||||
return out.split(/[\r\n]+/)[1].trim().split(/\s/)[1];
|
||||
}
|
||||
/**
|
||||
* A Regexp constant to get the GLIBC Version.
|
||||
* @type {string}
|
||||
*/
|
||||
const RE_GLIBC_VERSION = /LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i;
|
||||
|
||||
function safeReaddirSync (path) {
|
||||
/**
|
||||
* A String constant containing the value `musl`.
|
||||
* @type {string}
|
||||
* @public
|
||||
*/
|
||||
const MUSL = 'musl';
|
||||
|
||||
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-');
|
||||
|
||||
const familyFromReport = () => {
|
||||
const report = getReport();
|
||||
if (report.header && report.header.glibcVersionRuntime) {
|
||||
return GLIBC;
|
||||
}
|
||||
if (Array.isArray(report.sharedObjects)) {
|
||||
if (report.sharedObjects.some(isFileMusl)) {
|
||||
return MUSL;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const familyFromCommand = (out) => {
|
||||
const [getconf, ldd1] = out.split(/[\r\n]+/);
|
||||
if (getconf && getconf.includes(GLIBC)) {
|
||||
return GLIBC;
|
||||
}
|
||||
if (ldd1 && ldd1.includes(MUSL)) {
|
||||
return MUSL;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const familyFromInterpreterPath = (path) => {
|
||||
if (path) {
|
||||
if (path.includes('/ld-musl-')) {
|
||||
return MUSL;
|
||||
} else if (path.includes('/ld-linux-')) {
|
||||
return GLIBC;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const getFamilyFromLddContent = (content) => {
|
||||
content = content.toString();
|
||||
if (content.includes('musl')) {
|
||||
return MUSL;
|
||||
}
|
||||
if (content.includes('GNU C Library')) {
|
||||
return GLIBC;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const familyFromFilesystem = async () => {
|
||||
if (cachedFamilyFilesystem !== undefined) {
|
||||
return cachedFamilyFilesystem;
|
||||
}
|
||||
cachedFamilyFilesystem = null;
|
||||
try {
|
||||
return readdirSync(path);
|
||||
const lddContent = await readFile(LDD_PATH);
|
||||
cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
|
||||
} catch (e) {}
|
||||
return [];
|
||||
}
|
||||
return cachedFamilyFilesystem;
|
||||
};
|
||||
|
||||
var family = '';
|
||||
var version = '';
|
||||
var method = '';
|
||||
const familyFromFilesystemSync = () => {
|
||||
if (cachedFamilyFilesystem !== undefined) {
|
||||
return cachedFamilyFilesystem;
|
||||
}
|
||||
cachedFamilyFilesystem = null;
|
||||
try {
|
||||
const lddContent = readFileSync(LDD_PATH);
|
||||
cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
|
||||
} catch (e) {}
|
||||
return cachedFamilyFilesystem;
|
||||
};
|
||||
|
||||
if (platform === 'linux') {
|
||||
// Try getconf
|
||||
var glibc = spawnSync('getconf', ['GNU_LIBC_VERSION'], spawnOptions);
|
||||
if (glibc.status === 0) {
|
||||
family = GLIBC;
|
||||
version = glibc.stdout.trim().split(' ')[1];
|
||||
method = 'getconf';
|
||||
} else {
|
||||
// Try ldd
|
||||
var ldd = spawnSync('ldd', ['--version'], spawnOptions);
|
||||
if (ldd.status === 0 && ldd.stdout.indexOf(MUSL) !== -1) {
|
||||
family = MUSL;
|
||||
version = versionFromMuslLdd(ldd.stdout);
|
||||
method = 'ldd';
|
||||
} else if (ldd.status === 1 && ldd.stderr.indexOf(MUSL) !== -1) {
|
||||
family = MUSL;
|
||||
version = versionFromMuslLdd(ldd.stderr);
|
||||
method = 'ldd';
|
||||
} else {
|
||||
// Try filesystem (family only)
|
||||
var lib = safeReaddirSync('/lib');
|
||||
if (lib.some(contains('-linux-gnu'))) {
|
||||
family = GLIBC;
|
||||
method = 'filesystem';
|
||||
} else if (lib.some(contains('libc.musl-'))) {
|
||||
family = MUSL;
|
||||
method = 'filesystem';
|
||||
} else if (lib.some(contains('ld-musl-'))) {
|
||||
family = MUSL;
|
||||
method = 'filesystem';
|
||||
} else {
|
||||
var usrSbin = safeReaddirSync('/usr/sbin');
|
||||
if (usrSbin.some(contains('glibc'))) {
|
||||
family = GLIBC;
|
||||
method = 'filesystem';
|
||||
}
|
||||
const familyFromInterpreter = async () => {
|
||||
if (cachedFamilyInterpreter !== undefined) {
|
||||
return cachedFamilyInterpreter;
|
||||
}
|
||||
cachedFamilyInterpreter = null;
|
||||
try {
|
||||
const selfContent = await readFile(SELF_PATH);
|
||||
const path = interpreterPath(selfContent);
|
||||
cachedFamilyInterpreter = familyFromInterpreterPath(path);
|
||||
} catch (e) {}
|
||||
return cachedFamilyInterpreter;
|
||||
};
|
||||
|
||||
const familyFromInterpreterSync = () => {
|
||||
if (cachedFamilyInterpreter !== undefined) {
|
||||
return cachedFamilyInterpreter;
|
||||
}
|
||||
cachedFamilyInterpreter = null;
|
||||
try {
|
||||
const selfContent = readFileSync(SELF_PATH);
|
||||
const path = interpreterPath(selfContent);
|
||||
cachedFamilyInterpreter = familyFromInterpreterPath(path);
|
||||
} catch (e) {}
|
||||
return cachedFamilyInterpreter;
|
||||
};
|
||||
|
||||
/**
|
||||
* Resolves with the libc family when it can be determined, `null` otherwise.
|
||||
* @returns {Promise<?string>}
|
||||
*/
|
||||
const family = async () => {
|
||||
let family = null;
|
||||
if (isLinux()) {
|
||||
family = await familyFromInterpreter();
|
||||
if (!family) {
|
||||
family = await familyFromFilesystem();
|
||||
if (!family) {
|
||||
family = familyFromReport();
|
||||
}
|
||||
if (!family) {
|
||||
const out = await safeCommand();
|
||||
family = familyFromCommand(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return family;
|
||||
};
|
||||
|
||||
var isNonGlibcLinux = (family !== '' && family !== GLIBC);
|
||||
/**
|
||||
* Returns the libc family when it can be determined, `null` otherwise.
|
||||
* @returns {?string}
|
||||
*/
|
||||
const familySync = () => {
|
||||
let family = null;
|
||||
if (isLinux()) {
|
||||
family = familyFromInterpreterSync();
|
||||
if (!family) {
|
||||
family = familyFromFilesystemSync();
|
||||
if (!family) {
|
||||
family = familyFromReport();
|
||||
}
|
||||
if (!family) {
|
||||
const out = safeCommandSync();
|
||||
family = familyFromCommand(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
return family;
|
||||
};
|
||||
|
||||
/**
|
||||
* Resolves `true` only when the platform is Linux and the libc family is not `glibc`.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC;
|
||||
|
||||
/**
|
||||
* Returns `true` only when the platform is Linux and the libc family is not `glibc`.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC;
|
||||
|
||||
const versionFromFilesystem = async () => {
|
||||
if (cachedVersionFilesystem !== undefined) {
|
||||
return cachedVersionFilesystem;
|
||||
}
|
||||
cachedVersionFilesystem = null;
|
||||
try {
|
||||
const lddContent = await readFile(LDD_PATH);
|
||||
const versionMatch = lddContent.match(RE_GLIBC_VERSION);
|
||||
if (versionMatch) {
|
||||
cachedVersionFilesystem = versionMatch[1];
|
||||
}
|
||||
} catch (e) {}
|
||||
return cachedVersionFilesystem;
|
||||
};
|
||||
|
||||
const versionFromFilesystemSync = () => {
|
||||
if (cachedVersionFilesystem !== undefined) {
|
||||
return cachedVersionFilesystem;
|
||||
}
|
||||
cachedVersionFilesystem = null;
|
||||
try {
|
||||
const lddContent = readFileSync(LDD_PATH);
|
||||
const versionMatch = lddContent.match(RE_GLIBC_VERSION);
|
||||
if (versionMatch) {
|
||||
cachedVersionFilesystem = versionMatch[1];
|
||||
}
|
||||
} catch (e) {}
|
||||
return cachedVersionFilesystem;
|
||||
};
|
||||
|
||||
const versionFromReport = () => {
|
||||
const report = getReport();
|
||||
if (report.header && report.header.glibcVersionRuntime) {
|
||||
return report.header.glibcVersionRuntime;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const versionSuffix = (s) => s.trim().split(/\s+/)[1];
|
||||
|
||||
const versionFromCommand = (out) => {
|
||||
const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/);
|
||||
if (getconf && getconf.includes(GLIBC)) {
|
||||
return versionSuffix(getconf);
|
||||
}
|
||||
if (ldd1 && ldd2 && ldd1.includes(MUSL)) {
|
||||
return versionSuffix(ldd2);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Resolves with the libc version when it can be determined, `null` otherwise.
|
||||
* @returns {Promise<?string>}
|
||||
*/
|
||||
const version = async () => {
|
||||
let version = null;
|
||||
if (isLinux()) {
|
||||
version = await versionFromFilesystem();
|
||||
if (!version) {
|
||||
version = versionFromReport();
|
||||
}
|
||||
if (!version) {
|
||||
const out = await safeCommand();
|
||||
version = versionFromCommand(out);
|
||||
}
|
||||
}
|
||||
return version;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the libc version when it can be determined, `null` otherwise.
|
||||
* @returns {?string}
|
||||
*/
|
||||
const versionSync = () => {
|
||||
let version = null;
|
||||
if (isLinux()) {
|
||||
version = versionFromFilesystemSync();
|
||||
if (!version) {
|
||||
version = versionFromReport();
|
||||
}
|
||||
if (!version) {
|
||||
const out = safeCommandSync();
|
||||
version = versionFromCommand(out);
|
||||
}
|
||||
}
|
||||
return version;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
GLIBC: GLIBC,
|
||||
MUSL: MUSL,
|
||||
family: family,
|
||||
version: version,
|
||||
method: method,
|
||||
isNonGlibcLinux: isNonGlibcLinux
|
||||
GLIBC,
|
||||
MUSL,
|
||||
family,
|
||||
familySync,
|
||||
isNonGlibcLinux,
|
||||
isNonGlibcLinuxSync,
|
||||
version,
|
||||
versionSync
|
||||
};
|
||||
|
|
|
|||
35
node_modules/detect-libc/package.json
generated
vendored
35
node_modules/detect-libc/package.json
generated
vendored
|
|
@ -1,17 +1,21 @@
|
|||
{
|
||||
"name": "detect-libc",
|
||||
"version": "1.0.3",
|
||||
"version": "2.1.2",
|
||||
"description": "Node.js module to detect the C standard library (libc) implementation family and version",
|
||||
"main": "lib/detect-libc.js",
|
||||
"bin": {
|
||||
"detect-libc": "./bin/detect-libc.js"
|
||||
},
|
||||
"files": [
|
||||
"lib/",
|
||||
"index.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "semistandard && nyc --reporter=lcov ava"
|
||||
"test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js",
|
||||
"changelog": "conventional-changelog -i CHANGELOG.md -s",
|
||||
"bench": "node benchmark/detect-libc",
|
||||
"bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/lovell/detect-libc"
|
||||
"url": "git://github.com/lovell/detect-libc.git"
|
||||
},
|
||||
"keywords": [
|
||||
"libc",
|
||||
|
|
@ -20,16 +24,21 @@
|
|||
],
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"contributors": [
|
||||
"Niklas Salmoukas <niklas@salmoukas.com>"
|
||||
"Niklas Salmoukas <niklas@salmoukas.com>",
|
||||
"Vinícius Lourenço <vinyygamerlol@gmail.com>"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"ava": "^0.23.0",
|
||||
"nyc": "^11.3.0",
|
||||
"proxyquire": "^1.8.0",
|
||||
"semistandard": "^11.0.0"
|
||||
"ava": "^2.4.0",
|
||||
"benchmark": "^2.1.4",
|
||||
"conventional-changelog-cli": "^5.0.0",
|
||||
"eslint-config-standard": "^13.0.1",
|
||||
"nyc": "^15.1.0",
|
||||
"proxyquire": "^2.1.3",
|
||||
"semistandard": "^14.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
"node": ">=8"
|
||||
},
|
||||
"types": "index.d.ts"
|
||||
}
|
||||
|
|
|
|||
2
node_modules/enhanced-resolve/lib/AliasPlugin.js
generated
vendored
2
node_modules/enhanced-resolve/lib/AliasPlugin.js
generated
vendored
|
|
@ -107,7 +107,7 @@ module.exports = class AliasPlugin {
|
|||
prefix.length,
|
||||
innerRequest.length - suffix.length,
|
||||
);
|
||||
newRequestStr = item.alias.toString().replace("*", match);
|
||||
newRequestStr = alias.toString().replace("*", match);
|
||||
}
|
||||
|
||||
if (
|
||||
|
|
|
|||
9
node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js
generated
vendored
9
node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js
generated
vendored
|
|
@ -114,9 +114,14 @@ module.exports = class ExportsFieldPlugin {
|
|||
}
|
||||
|
||||
if (paths.length === 0) {
|
||||
const conditions = [...this.conditionNames];
|
||||
const conditionsStr =
|
||||
conditions.length === 1
|
||||
? `the condition "${conditions[0]}"`
|
||||
: `the conditions ${JSON.stringify(conditions)}`;
|
||||
return callback(
|
||||
new Error(
|
||||
`Package path ${remainingRequest} is not exported from package ${request.descriptionFileRoot} (see exports field in ${request.descriptionFilePath})`,
|
||||
`"${remainingRequest}" is not exported under ${conditionsStr} from package ${request.descriptionFileRoot} (see exports field in ${request.descriptionFilePath})`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -150,7 +155,7 @@ module.exports = class ExportsFieldPlugin {
|
|||
|
||||
if (
|
||||
invalidSegmentRegEx.exec(relativePath.slice(2)) !== null &&
|
||||
deprecatedInvalidSegmentRegEx.test(relativePath.slice(2)) !== null
|
||||
deprecatedInvalidSegmentRegEx.test(relativePath.slice(2))
|
||||
) {
|
||||
if (paths.length === i) {
|
||||
return callback(
|
||||
|
|
|
|||
5
node_modules/enhanced-resolve/lib/util/entrypoints.js
generated
vendored
5
node_modules/enhanced-resolve/lib/util/entrypoints.js
generated
vendored
|
|
@ -520,9 +520,8 @@ function assertImportsFieldRequest(request) {
|
|||
if (request.length === 1) {
|
||||
throw new Error("Request should have at least 2 characters");
|
||||
}
|
||||
if (request.charCodeAt(1) === slashCode) {
|
||||
throw new Error('Request should not start with "#/"');
|
||||
}
|
||||
// Note: #/ patterns are now allowed per Node.js PR #60864
|
||||
// https://github.com/nodejs/node/pull/60864
|
||||
if (request.charCodeAt(request.length - 1) === slashCode) {
|
||||
throw new Error("Only requesting file allowed");
|
||||
}
|
||||
|
|
|
|||
80
node_modules/enhanced-resolve/lib/util/identifier.js
generated
vendored
80
node_modules/enhanced-resolve/lib/util/identifier.js
generated
vendored
|
|
@ -5,64 +5,72 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const memorize = require("./memoize");
|
||||
|
||||
const getUrl = memorize(() => require("url"));
|
||||
|
||||
const PATH_QUERY_FRAGMENT_REGEXP =
|
||||
/^(#?(?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/;
|
||||
const ZERO_ESCAPE_REGEXP = /\0(.)/g;
|
||||
const FILE_REG_EXP = /file:/i;
|
||||
|
||||
/**
|
||||
* @param {string} identifier identifier
|
||||
* @returns {[string, string, string]|null} parsed identifier
|
||||
* @returns {[string, string, string] | null} parsed identifier
|
||||
*/
|
||||
function parseIdentifier(identifier) {
|
||||
if (!identifier) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (FILE_REG_EXP.test(identifier)) {
|
||||
identifier = getUrl().fileURLToPath(identifier);
|
||||
}
|
||||
|
||||
const firstEscape = identifier.indexOf("\0");
|
||||
if (firstEscape < 0) {
|
||||
// Fast path for inputs that don't use \0 escaping.
|
||||
const queryStart = identifier.indexOf("?");
|
||||
// Start at index 1 to ignore a possible leading hash.
|
||||
const fragmentStart = identifier.indexOf("#", 1);
|
||||
|
||||
if (fragmentStart < 0) {
|
||||
if (queryStart < 0) {
|
||||
// No fragment, no query
|
||||
return [identifier, "", ""];
|
||||
}
|
||||
// Query, no fragment
|
||||
return [
|
||||
identifier.slice(0, queryStart),
|
||||
identifier.slice(queryStart),
|
||||
"",
|
||||
];
|
||||
}
|
||||
// Handle `\0`
|
||||
if (firstEscape !== -1) {
|
||||
const match = PATH_QUERY_FRAGMENT_REGEXP.exec(identifier);
|
||||
|
||||
if (queryStart < 0 || fragmentStart < queryStart) {
|
||||
// Fragment, no query
|
||||
return [
|
||||
identifier.slice(0, fragmentStart),
|
||||
"",
|
||||
identifier.slice(fragmentStart),
|
||||
];
|
||||
}
|
||||
if (!match) return null;
|
||||
|
||||
// Query and fragment
|
||||
return [
|
||||
identifier.slice(0, queryStart),
|
||||
identifier.slice(queryStart, fragmentStart),
|
||||
match[1].replace(ZERO_ESCAPE_REGEXP, "$1"),
|
||||
match[2] ? match[2].replace(ZERO_ESCAPE_REGEXP, "$1") : "",
|
||||
match[3] || "",
|
||||
];
|
||||
}
|
||||
|
||||
// Fast path for inputs that don't use \0 escaping.
|
||||
const queryStart = identifier.indexOf("?");
|
||||
// Start at index 1 to ignore a possible leading hash.
|
||||
const fragmentStart = identifier.indexOf("#", 1);
|
||||
|
||||
if (fragmentStart < 0) {
|
||||
if (queryStart < 0) {
|
||||
// No fragment, no query
|
||||
return [identifier, "", ""];
|
||||
}
|
||||
|
||||
// Query, no fragment
|
||||
return [identifier.slice(0, queryStart), identifier.slice(queryStart), ""];
|
||||
}
|
||||
|
||||
if (queryStart < 0 || fragmentStart < queryStart) {
|
||||
// Fragment, no query
|
||||
return [
|
||||
identifier.slice(0, fragmentStart),
|
||||
"",
|
||||
identifier.slice(fragmentStart),
|
||||
];
|
||||
}
|
||||
|
||||
const match = PATH_QUERY_FRAGMENT_REGEXP.exec(identifier);
|
||||
|
||||
if (!match) return null;
|
||||
|
||||
// Query and fragment
|
||||
return [
|
||||
match[1].replace(ZERO_ESCAPE_REGEXP, "$1"),
|
||||
match[2] ? match[2].replace(ZERO_ESCAPE_REGEXP, "$1") : "",
|
||||
match[3] || "",
|
||||
identifier.slice(0, queryStart),
|
||||
identifier.slice(queryStart, fragmentStart),
|
||||
identifier.slice(fragmentStart),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
2
node_modules/enhanced-resolve/package.json
generated
vendored
2
node_modules/enhanced-resolve/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "enhanced-resolve",
|
||||
"version": "5.18.3",
|
||||
"version": "5.18.4",
|
||||
"description": "Offers a async require.resolve function. It's highly configurable.",
|
||||
"homepage": "http://github.com/webpack/enhanced-resolve",
|
||||
"repository": {
|
||||
|
|
|
|||
21
node_modules/fill-range/LICENSE
generated
vendored
21
node_modules/fill-range/LICENSE
generated
vendored
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
237
node_modules/fill-range/README.md
generated
vendored
237
node_modules/fill-range/README.md
generated
vendored
|
|
@ -1,237 +0,0 @@
|
|||
# fill-range [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [](https://www.npmjs.com/package/fill-range) [](https://npmjs.org/package/fill-range) [](https://npmjs.org/package/fill-range) [](https://travis-ci.org/jonschlinkert/fill-range)
|
||||
|
||||
> Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save fill-range
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Expands numbers and letters, optionally using a `step` as the last argument. _(Numbers may be defined as JavaScript numbers or strings)_.
|
||||
|
||||
```js
|
||||
const fill = require('fill-range');
|
||||
// fill(from, to[, step, options]);
|
||||
|
||||
console.log(fill('1', '10')); //=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
|
||||
console.log(fill('1', '10', { toRegex: true })); //=> [1-9]|10
|
||||
```
|
||||
|
||||
**Params**
|
||||
|
||||
* `from`: **{String|Number}** the number or letter to start with
|
||||
* `to`: **{String|Number}** the number or letter to end with
|
||||
* `step`: **{String|Number|Object|Function}** Optionally pass a [step](#optionsstep) to use.
|
||||
* `options`: **{Object|Function}**: See all available [options](#options)
|
||||
|
||||
## Examples
|
||||
|
||||
By default, an array of values is returned.
|
||||
|
||||
**Alphabetical ranges**
|
||||
|
||||
```js
|
||||
console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e']
|
||||
console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ]
|
||||
```
|
||||
|
||||
**Numerical ranges**
|
||||
|
||||
Numbers can be defined as actual numbers or strings.
|
||||
|
||||
```js
|
||||
console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ]
|
||||
console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ]
|
||||
```
|
||||
|
||||
**Negative ranges**
|
||||
|
||||
Numbers can be defined as actual numbers or strings.
|
||||
|
||||
```js
|
||||
console.log(fill('-5', '-1')); //=> [ '-5', '-4', '-3', '-2', '-1' ]
|
||||
console.log(fill('-5', '5')); //=> [ '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5' ]
|
||||
```
|
||||
|
||||
**Steps (increments)**
|
||||
|
||||
```js
|
||||
// numerical ranges with increments
|
||||
console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ]
|
||||
console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ]
|
||||
console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ]
|
||||
|
||||
// alphabetical ranges with increments
|
||||
console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ]
|
||||
console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ]
|
||||
console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ]
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### options.step
|
||||
|
||||
**Type**: `number` (formatted as a string or number)
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**: The increment to use for the range. Can be used with letters or numbers.
|
||||
|
||||
**Example(s)**
|
||||
|
||||
```js
|
||||
// numbers
|
||||
console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ]
|
||||
console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ]
|
||||
console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ]
|
||||
|
||||
// letters
|
||||
console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ]
|
||||
console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ]
|
||||
console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ]
|
||||
```
|
||||
|
||||
### options.strictRanges
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Default**: `false`
|
||||
|
||||
**Description**: By default, `null` is returned when an invalid range is passed. Enable this option to throw a `RangeError` on invalid ranges.
|
||||
|
||||
**Example(s)**
|
||||
|
||||
The following are all invalid:
|
||||
|
||||
```js
|
||||
fill('1.1', '2'); // decimals not supported in ranges
|
||||
fill('a', '2'); // incompatible range values
|
||||
fill(1, 10, 'foo'); // invalid "step" argument
|
||||
```
|
||||
|
||||
### options.stringify
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**: Cast all returned values to strings. By default, integers are returned as numbers.
|
||||
|
||||
**Example(s)**
|
||||
|
||||
```js
|
||||
console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ]
|
||||
console.log(fill(1, 5, { stringify: true })); //=> [ '1', '2', '3', '4', '5' ]
|
||||
```
|
||||
|
||||
### options.toRegex
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**: Create a regex-compatible source string, instead of expanding values to an array.
|
||||
|
||||
**Example(s)**
|
||||
|
||||
```js
|
||||
// alphabetical range
|
||||
console.log(fill('a', 'e', { toRegex: true })); //=> '[a-e]'
|
||||
// alphabetical with step
|
||||
console.log(fill('a', 'z', 3, { toRegex: true })); //=> 'a|d|g|j|m|p|s|v|y'
|
||||
// numerical range
|
||||
console.log(fill('1', '100', { toRegex: true })); //=> '[1-9]|[1-9][0-9]|100'
|
||||
// numerical range with zero padding
|
||||
console.log(fill('000001', '100000', { toRegex: true }));
|
||||
//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000'
|
||||
```
|
||||
|
||||
### options.transform
|
||||
|
||||
**Type**: `function`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_.
|
||||
|
||||
**Example(s)**
|
||||
|
||||
```js
|
||||
// add zero padding
|
||||
console.log(fill(1, 5, value => String(value).padStart(4, '0')));
|
||||
//=> ['0001', '0002', '0003', '0004', '0005']
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 116 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 4 | [paulmillr](https://github.com/paulmillr) |
|
||||
| 2 | [realityking](https://github.com/realityking) |
|
||||
| 2 | [bluelovers](https://github.com/bluelovers) |
|
||||
| 1 | [edorivai](https://github.com/edorivai) |
|
||||
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [GitHub Profile](https://github.com/jonschlinkert)
|
||||
* [Twitter Profile](https://twitter.com/jonschlinkert)
|
||||
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
||||
|
||||
Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)!
|
||||
|
||||
<a href="https://www.patreon.com/jonschlinkert">
|
||||
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="50">
|
||||
</a>
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._
|
||||
248
node_modules/fill-range/index.js
generated
vendored
248
node_modules/fill-range/index.js
generated
vendored
|
|
@ -1,248 +0,0 @@
|
|||
/*!
|
||||
* fill-range <https://github.com/jonschlinkert/fill-range>
|
||||
*
|
||||
* Copyright (c) 2014-present, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const util = require('util');
|
||||
const toRegexRange = require('to-regex-range');
|
||||
|
||||
const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
||||
|
||||
const transform = toNumber => {
|
||||
return value => toNumber === true ? Number(value) : String(value);
|
||||
};
|
||||
|
||||
const isValidValue = value => {
|
||||
return typeof value === 'number' || (typeof value === 'string' && value !== '');
|
||||
};
|
||||
|
||||
const isNumber = num => Number.isInteger(+num);
|
||||
|
||||
const zeros = input => {
|
||||
let value = `${input}`;
|
||||
let index = -1;
|
||||
if (value[0] === '-') value = value.slice(1);
|
||||
if (value === '0') return false;
|
||||
while (value[++index] === '0');
|
||||
return index > 0;
|
||||
};
|
||||
|
||||
const stringify = (start, end, options) => {
|
||||
if (typeof start === 'string' || typeof end === 'string') {
|
||||
return true;
|
||||
}
|
||||
return options.stringify === true;
|
||||
};
|
||||
|
||||
const pad = (input, maxLength, toNumber) => {
|
||||
if (maxLength > 0) {
|
||||
let dash = input[0] === '-' ? '-' : '';
|
||||
if (dash) input = input.slice(1);
|
||||
input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
|
||||
}
|
||||
if (toNumber === false) {
|
||||
return String(input);
|
||||
}
|
||||
return input;
|
||||
};
|
||||
|
||||
const toMaxLen = (input, maxLength) => {
|
||||
let negative = input[0] === '-' ? '-' : '';
|
||||
if (negative) {
|
||||
input = input.slice(1);
|
||||
maxLength--;
|
||||
}
|
||||
while (input.length < maxLength) input = '0' + input;
|
||||
return negative ? ('-' + input) : input;
|
||||
};
|
||||
|
||||
const toSequence = (parts, options, maxLen) => {
|
||||
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
||||
parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
||||
|
||||
let prefix = options.capture ? '' : '?:';
|
||||
let positives = '';
|
||||
let negatives = '';
|
||||
let result;
|
||||
|
||||
if (parts.positives.length) {
|
||||
positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|');
|
||||
}
|
||||
|
||||
if (parts.negatives.length) {
|
||||
negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`;
|
||||
}
|
||||
|
||||
if (positives && negatives) {
|
||||
result = `${positives}|${negatives}`;
|
||||
} else {
|
||||
result = positives || negatives;
|
||||
}
|
||||
|
||||
if (options.wrap) {
|
||||
return `(${prefix}${result})`;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
const toRange = (a, b, isNumbers, options) => {
|
||||
if (isNumbers) {
|
||||
return toRegexRange(a, b, { wrap: false, ...options });
|
||||
}
|
||||
|
||||
let start = String.fromCharCode(a);
|
||||
if (a === b) return start;
|
||||
|
||||
let stop = String.fromCharCode(b);
|
||||
return `[${start}-${stop}]`;
|
||||
};
|
||||
|
||||
const toRegex = (start, end, options) => {
|
||||
if (Array.isArray(start)) {
|
||||
let wrap = options.wrap === true;
|
||||
let prefix = options.capture ? '' : '?:';
|
||||
return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
|
||||
}
|
||||
return toRegexRange(start, end, options);
|
||||
};
|
||||
|
||||
const rangeError = (...args) => {
|
||||
return new RangeError('Invalid range arguments: ' + util.inspect(...args));
|
||||
};
|
||||
|
||||
const invalidRange = (start, end, options) => {
|
||||
if (options.strictRanges === true) throw rangeError([start, end]);
|
||||
return [];
|
||||
};
|
||||
|
||||
const invalidStep = (step, options) => {
|
||||
if (options.strictRanges === true) {
|
||||
throw new TypeError(`Expected step "${step}" to be a number`);
|
||||
}
|
||||
return [];
|
||||
};
|
||||
|
||||
const fillNumbers = (start, end, step = 1, options = {}) => {
|
||||
let a = Number(start);
|
||||
let b = Number(end);
|
||||
|
||||
if (!Number.isInteger(a) || !Number.isInteger(b)) {
|
||||
if (options.strictRanges === true) throw rangeError([start, end]);
|
||||
return [];
|
||||
}
|
||||
|
||||
// fix negative zero
|
||||
if (a === 0) a = 0;
|
||||
if (b === 0) b = 0;
|
||||
|
||||
let descending = a > b;
|
||||
let startString = String(start);
|
||||
let endString = String(end);
|
||||
let stepString = String(step);
|
||||
step = Math.max(Math.abs(step), 1);
|
||||
|
||||
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
||||
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
||||
let toNumber = padded === false && stringify(start, end, options) === false;
|
||||
let format = options.transform || transform(toNumber);
|
||||
|
||||
if (options.toRegex && step === 1) {
|
||||
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
||||
}
|
||||
|
||||
let parts = { negatives: [], positives: [] };
|
||||
let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
|
||||
let range = [];
|
||||
let index = 0;
|
||||
|
||||
while (descending ? a >= b : a <= b) {
|
||||
if (options.toRegex === true && step > 1) {
|
||||
push(a);
|
||||
} else {
|
||||
range.push(pad(format(a, index), maxLen, toNumber));
|
||||
}
|
||||
a = descending ? a - step : a + step;
|
||||
index++;
|
||||
}
|
||||
|
||||
if (options.toRegex === true) {
|
||||
return step > 1
|
||||
? toSequence(parts, options, maxLen)
|
||||
: toRegex(range, null, { wrap: false, ...options });
|
||||
}
|
||||
|
||||
return range;
|
||||
};
|
||||
|
||||
const fillLetters = (start, end, step = 1, options = {}) => {
|
||||
if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
|
||||
return invalidRange(start, end, options);
|
||||
}
|
||||
|
||||
let format = options.transform || (val => String.fromCharCode(val));
|
||||
let a = `${start}`.charCodeAt(0);
|
||||
let b = `${end}`.charCodeAt(0);
|
||||
|
||||
let descending = a > b;
|
||||
let min = Math.min(a, b);
|
||||
let max = Math.max(a, b);
|
||||
|
||||
if (options.toRegex && step === 1) {
|
||||
return toRange(min, max, false, options);
|
||||
}
|
||||
|
||||
let range = [];
|
||||
let index = 0;
|
||||
|
||||
while (descending ? a >= b : a <= b) {
|
||||
range.push(format(a, index));
|
||||
a = descending ? a - step : a + step;
|
||||
index++;
|
||||
}
|
||||
|
||||
if (options.toRegex === true) {
|
||||
return toRegex(range, null, { wrap: false, options });
|
||||
}
|
||||
|
||||
return range;
|
||||
};
|
||||
|
||||
const fill = (start, end, step, options = {}) => {
|
||||
if (end == null && isValidValue(start)) {
|
||||
return [start];
|
||||
}
|
||||
|
||||
if (!isValidValue(start) || !isValidValue(end)) {
|
||||
return invalidRange(start, end, options);
|
||||
}
|
||||
|
||||
if (typeof step === 'function') {
|
||||
return fill(start, end, 1, { transform: step });
|
||||
}
|
||||
|
||||
if (isObject(step)) {
|
||||
return fill(start, end, 0, step);
|
||||
}
|
||||
|
||||
let opts = { ...options };
|
||||
if (opts.capture === true) opts.wrap = true;
|
||||
step = step || opts.step || 1;
|
||||
|
||||
if (!isNumber(step)) {
|
||||
if (step != null && !isObject(step)) return invalidStep(step, opts);
|
||||
return fill(start, end, 1, step);
|
||||
}
|
||||
|
||||
if (isNumber(start) && isNumber(end)) {
|
||||
return fillNumbers(start, end, step, opts);
|
||||
}
|
||||
|
||||
return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
|
||||
};
|
||||
|
||||
module.exports = fill;
|
||||
74
node_modules/fill-range/package.json
generated
vendored
74
node_modules/fill-range/package.json
generated
vendored
|
|
@ -1,74 +0,0 @@
|
|||
{
|
||||
"name": "fill-range",
|
||||
"description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`",
|
||||
"version": "7.1.1",
|
||||
"homepage": "https://github.com/jonschlinkert/fill-range",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Edo Rivai (edo.rivai.nl)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Paul Miller (paulmillr.com)",
|
||||
"Rouven Weßling (www.rouvenwessling.de)",
|
||||
"(https://github.com/wtgtybhertgeghgtwtg)"
|
||||
],
|
||||
"repository": "jonschlinkert/fill-range",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/fill-range/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
|
||||
"mocha": "mocha --reporter dot",
|
||||
"test": "npm run lint && npm run mocha",
|
||||
"test:ci": "npm run test:cover",
|
||||
"test:cover": "nyc npm run mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^2.0.0",
|
||||
"mocha": "^6.1.1",
|
||||
"nyc": "^15.1.0"
|
||||
},
|
||||
"keywords": [
|
||||
"alpha",
|
||||
"alphabetical",
|
||||
"array",
|
||||
"bash",
|
||||
"brace",
|
||||
"expand",
|
||||
"expansion",
|
||||
"fill",
|
||||
"glob",
|
||||
"match",
|
||||
"matches",
|
||||
"matching",
|
||||
"number",
|
||||
"numerical",
|
||||
"range",
|
||||
"ranges",
|
||||
"regex",
|
||||
"sh"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
21
node_modules/is-number/LICENSE
generated
vendored
21
node_modules/is-number/LICENSE
generated
vendored
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
187
node_modules/is-number/README.md
generated
vendored
187
node_modules/is-number/README.md
generated
vendored
|
|
@ -1,187 +0,0 @@
|
|||
# is-number [](https://www.npmjs.com/package/is-number) [](https://npmjs.org/package/is-number) [](https://npmjs.org/package/is-number) [](https://travis-ci.org/jonschlinkert/is-number)
|
||||
|
||||
> Returns true if the value is a finite number.
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save is-number
|
||||
```
|
||||
|
||||
## Why is this needed?
|
||||
|
||||
In JavaScript, it's not always as straightforward as it should be to reliably check if a value is a number. It's common for devs to use `+`, `-`, or `Number()` to cast a string value to a number (for example, when values are returned from user input, regex matches, parsers, etc). But there are many non-intuitive edge cases that yield unexpected results:
|
||||
|
||||
```js
|
||||
console.log(+[]); //=> 0
|
||||
console.log(+''); //=> 0
|
||||
console.log(+' '); //=> 0
|
||||
console.log(typeof NaN); //=> 'number'
|
||||
```
|
||||
|
||||
This library offers a performant way to smooth out edge cases like these.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const isNumber = require('is-number');
|
||||
```
|
||||
|
||||
See the [tests](./test.js) for more examples.
|
||||
|
||||
### true
|
||||
|
||||
```js
|
||||
isNumber(5e3); // true
|
||||
isNumber(0xff); // true
|
||||
isNumber(-1.1); // true
|
||||
isNumber(0); // true
|
||||
isNumber(1); // true
|
||||
isNumber(1.1); // true
|
||||
isNumber(10); // true
|
||||
isNumber(10.10); // true
|
||||
isNumber(100); // true
|
||||
isNumber('-1.1'); // true
|
||||
isNumber('0'); // true
|
||||
isNumber('012'); // true
|
||||
isNumber('0xff'); // true
|
||||
isNumber('1'); // true
|
||||
isNumber('1.1'); // true
|
||||
isNumber('10'); // true
|
||||
isNumber('10.10'); // true
|
||||
isNumber('100'); // true
|
||||
isNumber('5e3'); // true
|
||||
isNumber(parseInt('012')); // true
|
||||
isNumber(parseFloat('012')); // true
|
||||
```
|
||||
|
||||
### False
|
||||
|
||||
Everything else is false, as you would expect:
|
||||
|
||||
```js
|
||||
isNumber(Infinity); // false
|
||||
isNumber(NaN); // false
|
||||
isNumber(null); // false
|
||||
isNumber(undefined); // false
|
||||
isNumber(''); // false
|
||||
isNumber(' '); // false
|
||||
isNumber('foo'); // false
|
||||
isNumber([1]); // false
|
||||
isNumber([]); // false
|
||||
isNumber(function () {}); // false
|
||||
isNumber({}); // false
|
||||
```
|
||||
|
||||
## Release history
|
||||
|
||||
### 7.0.0
|
||||
|
||||
* Refactor. Now uses `.isFinite` if it exists.
|
||||
* Performance is about the same as v6.0 when the value is a string or number. But it's now 3x-4x faster when the value is not a string or number.
|
||||
|
||||
### 6.0.0
|
||||
|
||||
* Optimizations, thanks to @benaadams.
|
||||
|
||||
### 5.0.0
|
||||
|
||||
**Breaking changes**
|
||||
|
||||
* removed support for `instanceof Number` and `instanceof String`
|
||||
|
||||
## Benchmarks
|
||||
|
||||
As with all benchmarks, take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail.
|
||||
|
||||
```
|
||||
# all
|
||||
v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled)
|
||||
v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled)
|
||||
parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled)
|
||||
fastest is 'v7.0'
|
||||
|
||||
# string
|
||||
v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled)
|
||||
v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled)
|
||||
parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled)
|
||||
fastest is 'parseFloat,v7.0'
|
||||
|
||||
# number
|
||||
v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled)
|
||||
v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled)
|
||||
parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled)
|
||||
fastest is 'v6.0'
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Related projects
|
||||
|
||||
You might also be interested in these projects:
|
||||
|
||||
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
|
||||
* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ")
|
||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
||||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 49 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 5 | [charlike-old](https://github.com/charlike-old) |
|
||||
| 1 | [benaadams](https://github.com/benaadams) |
|
||||
| 1 | [realityking](https://github.com/realityking) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
||||
* [GitHub Profile](https://github.com/jonschlinkert)
|
||||
* [Twitter Profile](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 15, 2018._
|
||||
18
node_modules/is-number/index.js
generated
vendored
18
node_modules/is-number/index.js
generated
vendored
|
|
@ -1,18 +0,0 @@
|
|||
/*!
|
||||
* is-number <https://github.com/jonschlinkert/is-number>
|
||||
*
|
||||
* Copyright (c) 2014-present, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function(num) {
|
||||
if (typeof num === 'number') {
|
||||
return num - num === 0;
|
||||
}
|
||||
if (typeof num === 'string' && num.trim() !== '') {
|
||||
return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
82
node_modules/is-number/package.json
generated
vendored
82
node_modules/is-number/package.json
generated
vendored
|
|
@ -1,82 +0,0 @@
|
|||
{
|
||||
"name": "is-number",
|
||||
"description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.",
|
||||
"version": "7.0.0",
|
||||
"homepage": "https://github.com/jonschlinkert/is-number",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Olsten Larck (https://i.am.charlike.online)",
|
||||
"Rouven Weßling (www.rouvenwessling.de)"
|
||||
],
|
||||
"repository": "jonschlinkert/is-number",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/is-number/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ansi": "^0.3.1",
|
||||
"benchmark": "^2.1.4",
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.5.3"
|
||||
},
|
||||
"keywords": [
|
||||
"cast",
|
||||
"check",
|
||||
"coerce",
|
||||
"coercion",
|
||||
"finite",
|
||||
"integer",
|
||||
"is",
|
||||
"isnan",
|
||||
"is-nan",
|
||||
"is-num",
|
||||
"is-number",
|
||||
"isnumber",
|
||||
"isfinite",
|
||||
"istype",
|
||||
"kind",
|
||||
"math",
|
||||
"nan",
|
||||
"num",
|
||||
"number",
|
||||
"numeric",
|
||||
"parseFloat",
|
||||
"parseInt",
|
||||
"test",
|
||||
"type",
|
||||
"typeof",
|
||||
"value"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"is-plain-object",
|
||||
"is-primitive",
|
||||
"isobject",
|
||||
"kind-of"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
201
node_modules/lightningcss/node_modules/detect-libc/LICENSE
generated
vendored
201
node_modules/lightningcss/node_modules/detect-libc/LICENSE
generated
vendored
|
|
@ -1,201 +0,0 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
163
node_modules/lightningcss/node_modules/detect-libc/README.md
generated
vendored
163
node_modules/lightningcss/node_modules/detect-libc/README.md
generated
vendored
|
|
@ -1,163 +0,0 @@
|
|||
# detect-libc
|
||||
|
||||
Node.js module to detect details of the C standard library (libc)
|
||||
implementation provided by a given Linux system.
|
||||
|
||||
Currently supports detection of GNU glibc and MUSL libc.
|
||||
|
||||
Provides asychronous and synchronous functions for the
|
||||
family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`).
|
||||
|
||||
The version numbers of libc implementations
|
||||
are not guaranteed to be semver-compliant.
|
||||
|
||||
For previous v1.x releases, please see the
|
||||
[v1](https://github.com/lovell/detect-libc/tree/v1) branch.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install detect-libc
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### GLIBC
|
||||
|
||||
```ts
|
||||
const GLIBC: string = 'glibc';
|
||||
```
|
||||
|
||||
A String constant containing the value `glibc`.
|
||||
|
||||
### MUSL
|
||||
|
||||
```ts
|
||||
const MUSL: string = 'musl';
|
||||
```
|
||||
|
||||
A String constant containing the value `musl`.
|
||||
|
||||
### family
|
||||
|
||||
```ts
|
||||
function family(): Promise<string | null>;
|
||||
```
|
||||
|
||||
Resolves asychronously with:
|
||||
|
||||
* `glibc` or `musl` when the libc family can be determined
|
||||
* `null` when the libc family cannot be determined
|
||||
* `null` when run on a non-Linux platform
|
||||
|
||||
```js
|
||||
const { family, GLIBC, MUSL } = require('detect-libc');
|
||||
|
||||
switch (await family()) {
|
||||
case GLIBC: ...
|
||||
case MUSL: ...
|
||||
case null: ...
|
||||
}
|
||||
```
|
||||
|
||||
### familySync
|
||||
|
||||
```ts
|
||||
function familySync(): string | null;
|
||||
```
|
||||
|
||||
Synchronous version of `family()`.
|
||||
|
||||
```js
|
||||
const { familySync, GLIBC, MUSL } = require('detect-libc');
|
||||
|
||||
switch (familySync()) {
|
||||
case GLIBC: ...
|
||||
case MUSL: ...
|
||||
case null: ...
|
||||
}
|
||||
```
|
||||
|
||||
### version
|
||||
|
||||
```ts
|
||||
function version(): Promise<string | null>;
|
||||
```
|
||||
|
||||
Resolves asychronously with:
|
||||
|
||||
* The version when it can be determined
|
||||
* `null` when the libc family cannot be determined
|
||||
* `null` when run on a non-Linux platform
|
||||
|
||||
```js
|
||||
const { version } = require('detect-libc');
|
||||
|
||||
const v = await version();
|
||||
if (v) {
|
||||
const [major, minor, patch] = v.split('.');
|
||||
}
|
||||
```
|
||||
|
||||
### versionSync
|
||||
|
||||
```ts
|
||||
function versionSync(): string | null;
|
||||
```
|
||||
|
||||
Synchronous version of `version()`.
|
||||
|
||||
```js
|
||||
const { versionSync } = require('detect-libc');
|
||||
|
||||
const v = versionSync();
|
||||
if (v) {
|
||||
const [major, minor, patch] = v.split('.');
|
||||
}
|
||||
```
|
||||
|
||||
### isNonGlibcLinux
|
||||
|
||||
```ts
|
||||
function isNonGlibcLinux(): Promise<boolean>;
|
||||
```
|
||||
|
||||
Resolves asychronously with:
|
||||
|
||||
* `false` when the libc family is `glibc`
|
||||
* `true` when the libc family is not `glibc`
|
||||
* `false` when run on a non-Linux platform
|
||||
|
||||
```js
|
||||
const { isNonGlibcLinux } = require('detect-libc');
|
||||
|
||||
if (await isNonGlibcLinux()) { ... }
|
||||
```
|
||||
|
||||
### isNonGlibcLinuxSync
|
||||
|
||||
```ts
|
||||
function isNonGlibcLinuxSync(): boolean;
|
||||
```
|
||||
|
||||
Synchronous version of `isNonGlibcLinux()`.
|
||||
|
||||
```js
|
||||
const { isNonGlibcLinuxSync } = require('detect-libc');
|
||||
|
||||
if (isNonGlibcLinuxSync()) { ... }
|
||||
```
|
||||
|
||||
## Licensing
|
||||
|
||||
Copyright 2017 Lovell Fuller and others.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
313
node_modules/lightningcss/node_modules/detect-libc/lib/detect-libc.js
generated
vendored
313
node_modules/lightningcss/node_modules/detect-libc/lib/detect-libc.js
generated
vendored
|
|
@ -1,313 +0,0 @@
|
|||
// Copyright 2017 Lovell Fuller and others.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
'use strict';
|
||||
|
||||
const childProcess = require('child_process');
|
||||
const { isLinux, getReport } = require('./process');
|
||||
const { LDD_PATH, SELF_PATH, readFile, readFileSync } = require('./filesystem');
|
||||
const { interpreterPath } = require('./elf');
|
||||
|
||||
let cachedFamilyInterpreter;
|
||||
let cachedFamilyFilesystem;
|
||||
let cachedVersionFilesystem;
|
||||
|
||||
const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true';
|
||||
let commandOut = '';
|
||||
|
||||
const safeCommand = () => {
|
||||
if (!commandOut) {
|
||||
return new Promise((resolve) => {
|
||||
childProcess.exec(command, (err, out) => {
|
||||
commandOut = err ? ' ' : out;
|
||||
resolve(commandOut);
|
||||
});
|
||||
});
|
||||
}
|
||||
return commandOut;
|
||||
};
|
||||
|
||||
const safeCommandSync = () => {
|
||||
if (!commandOut) {
|
||||
try {
|
||||
commandOut = childProcess.execSync(command, { encoding: 'utf8' });
|
||||
} catch (_err) {
|
||||
commandOut = ' ';
|
||||
}
|
||||
}
|
||||
return commandOut;
|
||||
};
|
||||
|
||||
/**
|
||||
* A String constant containing the value `glibc`.
|
||||
* @type {string}
|
||||
* @public
|
||||
*/
|
||||
const GLIBC = 'glibc';
|
||||
|
||||
/**
|
||||
* A Regexp constant to get the GLIBC Version.
|
||||
* @type {string}
|
||||
*/
|
||||
const RE_GLIBC_VERSION = /LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i;
|
||||
|
||||
/**
|
||||
* A String constant containing the value `musl`.
|
||||
* @type {string}
|
||||
* @public
|
||||
*/
|
||||
const MUSL = 'musl';
|
||||
|
||||
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-');
|
||||
|
||||
const familyFromReport = () => {
|
||||
const report = getReport();
|
||||
if (report.header && report.header.glibcVersionRuntime) {
|
||||
return GLIBC;
|
||||
}
|
||||
if (Array.isArray(report.sharedObjects)) {
|
||||
if (report.sharedObjects.some(isFileMusl)) {
|
||||
return MUSL;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const familyFromCommand = (out) => {
|
||||
const [getconf, ldd1] = out.split(/[\r\n]+/);
|
||||
if (getconf && getconf.includes(GLIBC)) {
|
||||
return GLIBC;
|
||||
}
|
||||
if (ldd1 && ldd1.includes(MUSL)) {
|
||||
return MUSL;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const familyFromInterpreterPath = (path) => {
|
||||
if (path) {
|
||||
if (path.includes('/ld-musl-')) {
|
||||
return MUSL;
|
||||
} else if (path.includes('/ld-linux-')) {
|
||||
return GLIBC;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const getFamilyFromLddContent = (content) => {
|
||||
content = content.toString();
|
||||
if (content.includes('musl')) {
|
||||
return MUSL;
|
||||
}
|
||||
if (content.includes('GNU C Library')) {
|
||||
return GLIBC;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const familyFromFilesystem = async () => {
|
||||
if (cachedFamilyFilesystem !== undefined) {
|
||||
return cachedFamilyFilesystem;
|
||||
}
|
||||
cachedFamilyFilesystem = null;
|
||||
try {
|
||||
const lddContent = await readFile(LDD_PATH);
|
||||
cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
|
||||
} catch (e) {}
|
||||
return cachedFamilyFilesystem;
|
||||
};
|
||||
|
||||
const familyFromFilesystemSync = () => {
|
||||
if (cachedFamilyFilesystem !== undefined) {
|
||||
return cachedFamilyFilesystem;
|
||||
}
|
||||
cachedFamilyFilesystem = null;
|
||||
try {
|
||||
const lddContent = readFileSync(LDD_PATH);
|
||||
cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
|
||||
} catch (e) {}
|
||||
return cachedFamilyFilesystem;
|
||||
};
|
||||
|
||||
const familyFromInterpreter = async () => {
|
||||
if (cachedFamilyInterpreter !== undefined) {
|
||||
return cachedFamilyInterpreter;
|
||||
}
|
||||
cachedFamilyInterpreter = null;
|
||||
try {
|
||||
const selfContent = await readFile(SELF_PATH);
|
||||
const path = interpreterPath(selfContent);
|
||||
cachedFamilyInterpreter = familyFromInterpreterPath(path);
|
||||
} catch (e) {}
|
||||
return cachedFamilyInterpreter;
|
||||
};
|
||||
|
||||
const familyFromInterpreterSync = () => {
|
||||
if (cachedFamilyInterpreter !== undefined) {
|
||||
return cachedFamilyInterpreter;
|
||||
}
|
||||
cachedFamilyInterpreter = null;
|
||||
try {
|
||||
const selfContent = readFileSync(SELF_PATH);
|
||||
const path = interpreterPath(selfContent);
|
||||
cachedFamilyInterpreter = familyFromInterpreterPath(path);
|
||||
} catch (e) {}
|
||||
return cachedFamilyInterpreter;
|
||||
};
|
||||
|
||||
/**
|
||||
* Resolves with the libc family when it can be determined, `null` otherwise.
|
||||
* @returns {Promise<?string>}
|
||||
*/
|
||||
const family = async () => {
|
||||
let family = null;
|
||||
if (isLinux()) {
|
||||
family = await familyFromInterpreter();
|
||||
if (!family) {
|
||||
family = await familyFromFilesystem();
|
||||
if (!family) {
|
||||
family = familyFromReport();
|
||||
}
|
||||
if (!family) {
|
||||
const out = await safeCommand();
|
||||
family = familyFromCommand(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
return family;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the libc family when it can be determined, `null` otherwise.
|
||||
* @returns {?string}
|
||||
*/
|
||||
const familySync = () => {
|
||||
let family = null;
|
||||
if (isLinux()) {
|
||||
family = familyFromInterpreterSync();
|
||||
if (!family) {
|
||||
family = familyFromFilesystemSync();
|
||||
if (!family) {
|
||||
family = familyFromReport();
|
||||
}
|
||||
if (!family) {
|
||||
const out = safeCommandSync();
|
||||
family = familyFromCommand(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
return family;
|
||||
};
|
||||
|
||||
/**
|
||||
* Resolves `true` only when the platform is Linux and the libc family is not `glibc`.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC;
|
||||
|
||||
/**
|
||||
* Returns `true` only when the platform is Linux and the libc family is not `glibc`.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC;
|
||||
|
||||
const versionFromFilesystem = async () => {
|
||||
if (cachedVersionFilesystem !== undefined) {
|
||||
return cachedVersionFilesystem;
|
||||
}
|
||||
cachedVersionFilesystem = null;
|
||||
try {
|
||||
const lddContent = await readFile(LDD_PATH);
|
||||
const versionMatch = lddContent.match(RE_GLIBC_VERSION);
|
||||
if (versionMatch) {
|
||||
cachedVersionFilesystem = versionMatch[1];
|
||||
}
|
||||
} catch (e) {}
|
||||
return cachedVersionFilesystem;
|
||||
};
|
||||
|
||||
const versionFromFilesystemSync = () => {
|
||||
if (cachedVersionFilesystem !== undefined) {
|
||||
return cachedVersionFilesystem;
|
||||
}
|
||||
cachedVersionFilesystem = null;
|
||||
try {
|
||||
const lddContent = readFileSync(LDD_PATH);
|
||||
const versionMatch = lddContent.match(RE_GLIBC_VERSION);
|
||||
if (versionMatch) {
|
||||
cachedVersionFilesystem = versionMatch[1];
|
||||
}
|
||||
} catch (e) {}
|
||||
return cachedVersionFilesystem;
|
||||
};
|
||||
|
||||
const versionFromReport = () => {
|
||||
const report = getReport();
|
||||
if (report.header && report.header.glibcVersionRuntime) {
|
||||
return report.header.glibcVersionRuntime;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const versionSuffix = (s) => s.trim().split(/\s+/)[1];
|
||||
|
||||
const versionFromCommand = (out) => {
|
||||
const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/);
|
||||
if (getconf && getconf.includes(GLIBC)) {
|
||||
return versionSuffix(getconf);
|
||||
}
|
||||
if (ldd1 && ldd2 && ldd1.includes(MUSL)) {
|
||||
return versionSuffix(ldd2);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Resolves with the libc version when it can be determined, `null` otherwise.
|
||||
* @returns {Promise<?string>}
|
||||
*/
|
||||
const version = async () => {
|
||||
let version = null;
|
||||
if (isLinux()) {
|
||||
version = await versionFromFilesystem();
|
||||
if (!version) {
|
||||
version = versionFromReport();
|
||||
}
|
||||
if (!version) {
|
||||
const out = await safeCommand();
|
||||
version = versionFromCommand(out);
|
||||
}
|
||||
}
|
||||
return version;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the libc version when it can be determined, `null` otherwise.
|
||||
* @returns {?string}
|
||||
*/
|
||||
const versionSync = () => {
|
||||
let version = null;
|
||||
if (isLinux()) {
|
||||
version = versionFromFilesystemSync();
|
||||
if (!version) {
|
||||
version = versionFromReport();
|
||||
}
|
||||
if (!version) {
|
||||
const out = safeCommandSync();
|
||||
version = versionFromCommand(out);
|
||||
}
|
||||
}
|
||||
return version;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
GLIBC,
|
||||
MUSL,
|
||||
family,
|
||||
familySync,
|
||||
isNonGlibcLinux,
|
||||
isNonGlibcLinuxSync,
|
||||
version,
|
||||
versionSync
|
||||
};
|
||||
44
node_modules/lightningcss/node_modules/detect-libc/package.json
generated
vendored
44
node_modules/lightningcss/node_modules/detect-libc/package.json
generated
vendored
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"name": "detect-libc",
|
||||
"version": "2.1.2",
|
||||
"description": "Node.js module to detect the C standard library (libc) implementation family and version",
|
||||
"main": "lib/detect-libc.js",
|
||||
"files": [
|
||||
"lib/",
|
||||
"index.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js",
|
||||
"changelog": "conventional-changelog -i CHANGELOG.md -s",
|
||||
"bench": "node benchmark/detect-libc",
|
||||
"bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/lovell/detect-libc.git"
|
||||
},
|
||||
"keywords": [
|
||||
"libc",
|
||||
"glibc",
|
||||
"musl"
|
||||
],
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"contributors": [
|
||||
"Niklas Salmoukas <niklas@salmoukas.com>",
|
||||
"Vinícius Lourenço <vinyygamerlol@gmail.com>"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"ava": "^2.4.0",
|
||||
"benchmark": "^2.1.4",
|
||||
"conventional-changelog-cli": "^5.0.0",
|
||||
"eslint-config-standard": "^13.0.1",
|
||||
"nyc": "^15.1.0",
|
||||
"proxyquire": "^2.1.3",
|
||||
"semistandard": "^14.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"types": "index.d.ts"
|
||||
}
|
||||
21
node_modules/micromatch/LICENSE
generated
vendored
21
node_modules/micromatch/LICENSE
generated
vendored
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
1024
node_modules/micromatch/README.md
generated
vendored
1024
node_modules/micromatch/README.md
generated
vendored
File diff suppressed because it is too large
Load diff
474
node_modules/micromatch/index.js
generated
vendored
474
node_modules/micromatch/index.js
generated
vendored
|
|
@ -1,474 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const util = require('util');
|
||||
const braces = require('braces');
|
||||
const picomatch = require('picomatch');
|
||||
const utils = require('picomatch/lib/utils');
|
||||
|
||||
const isEmptyString = v => v === '' || v === './';
|
||||
const hasBraces = v => {
|
||||
const index = v.indexOf('{');
|
||||
return index > -1 && v.indexOf('}', index) > -1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns an array of strings that match one or more glob patterns.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm(list, patterns[, options]);
|
||||
*
|
||||
* console.log(mm(['a.js', 'a.txt'], ['*.js']));
|
||||
* //=> [ 'a.js' ]
|
||||
* ```
|
||||
* @param {String|Array<string>} `list` List of strings to match.
|
||||
* @param {String|Array<string>} `patterns` One or more glob patterns to use for matching.
|
||||
* @param {Object} `options` See available [options](#options)
|
||||
* @return {Array} Returns an array of matches
|
||||
* @summary false
|
||||
* @api public
|
||||
*/
|
||||
|
||||
const micromatch = (list, patterns, options) => {
|
||||
patterns = [].concat(patterns);
|
||||
list = [].concat(list);
|
||||
|
||||
let omit = new Set();
|
||||
let keep = new Set();
|
||||
let items = new Set();
|
||||
let negatives = 0;
|
||||
|
||||
let onResult = state => {
|
||||
items.add(state.output);
|
||||
if (options && options.onResult) {
|
||||
options.onResult(state);
|
||||
}
|
||||
};
|
||||
|
||||
for (let i = 0; i < patterns.length; i++) {
|
||||
let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
|
||||
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
||||
if (negated) negatives++;
|
||||
|
||||
for (let item of list) {
|
||||
let matched = isMatch(item, true);
|
||||
|
||||
let match = negated ? !matched.isMatch : matched.isMatch;
|
||||
if (!match) continue;
|
||||
|
||||
if (negated) {
|
||||
omit.add(matched.output);
|
||||
} else {
|
||||
omit.delete(matched.output);
|
||||
keep.add(matched.output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let result = negatives === patterns.length ? [...items] : [...keep];
|
||||
let matches = result.filter(item => !omit.has(item));
|
||||
|
||||
if (options && matches.length === 0) {
|
||||
if (options.failglob === true) {
|
||||
throw new Error(`No matches found for "${patterns.join(', ')}"`);
|
||||
}
|
||||
|
||||
if (options.nonull === true || options.nullglob === true) {
|
||||
return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns;
|
||||
}
|
||||
}
|
||||
|
||||
return matches;
|
||||
};
|
||||
|
||||
/**
|
||||
* Backwards compatibility
|
||||
*/
|
||||
|
||||
micromatch.match = micromatch;
|
||||
|
||||
/**
|
||||
* Returns a matcher function from the given glob `pattern` and `options`.
|
||||
* The returned function takes a string to match as its only argument and returns
|
||||
* true if the string is a match.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.matcher(pattern[, options]);
|
||||
*
|
||||
* const isMatch = mm.matcher('*.!(*a)');
|
||||
* console.log(isMatch('a.a')); //=> false
|
||||
* console.log(isMatch('a.b')); //=> true
|
||||
* ```
|
||||
* @param {String} `pattern` Glob pattern
|
||||
* @param {Object} `options`
|
||||
* @return {Function} Returns a matcher function.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.matcher = (pattern, options) => picomatch(pattern, options);
|
||||
|
||||
/**
|
||||
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.isMatch(string, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
|
||||
* console.log(mm.isMatch('a.a', 'b.*')); //=> false
|
||||
* ```
|
||||
* @param {String} `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
|
||||
*/
|
||||
|
||||
micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
||||
|
||||
/**
|
||||
* Backwards compatibility
|
||||
*/
|
||||
|
||||
micromatch.any = micromatch.isMatch;
|
||||
|
||||
/**
|
||||
* Returns a list of strings that _**do not match any**_ of the given `patterns`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.not(list, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
|
||||
* //=> ['b.b', 'c.c']
|
||||
* ```
|
||||
* @param {Array} `list` Array of strings to match.
|
||||
* @param {String|Array} `patterns` One or more glob pattern to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Array} Returns an array of strings that **do not match** the given patterns.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.not = (list, patterns, options = {}) => {
|
||||
patterns = [].concat(patterns).map(String);
|
||||
let result = new Set();
|
||||
let items = [];
|
||||
|
||||
let onResult = state => {
|
||||
if (options.onResult) options.onResult(state);
|
||||
items.push(state.output);
|
||||
};
|
||||
|
||||
let matches = new Set(micromatch(list, patterns, { ...options, onResult }));
|
||||
|
||||
for (let item of items) {
|
||||
if (!matches.has(item)) {
|
||||
result.add(item);
|
||||
}
|
||||
}
|
||||
return [...result];
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the given `string` contains the given pattern. Similar
|
||||
* to [.isMatch](#isMatch) but the pattern can match any part of the string.
|
||||
*
|
||||
* ```js
|
||||
* var mm = require('micromatch');
|
||||
* // mm.contains(string, pattern[, options]);
|
||||
*
|
||||
* console.log(mm.contains('aa/bb/cc', '*b'));
|
||||
* //=> true
|
||||
* console.log(mm.contains('aa/bb/cc', '*d'));
|
||||
* //=> false
|
||||
* ```
|
||||
* @param {String} `str` The string to match.
|
||||
* @param {String|Array} `patterns` Glob pattern to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Boolean} Returns true if any of the patterns matches any part of `str`.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.contains = (str, pattern, options) => {
|
||||
if (typeof str !== 'string') {
|
||||
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
||||
}
|
||||
|
||||
if (Array.isArray(pattern)) {
|
||||
return pattern.some(p => micromatch.contains(str, p, options));
|
||||
}
|
||||
|
||||
if (typeof pattern === 'string') {
|
||||
if (isEmptyString(str) || isEmptyString(pattern)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return micromatch.isMatch(str, pattern, { ...options, contains: true });
|
||||
};
|
||||
|
||||
/**
|
||||
* Filter the keys of the given object with the given `glob` pattern
|
||||
* and `options`. Does not attempt to match nested keys. If you need this feature,
|
||||
* use [glob-object][] instead.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.matchKeys(object, patterns[, options]);
|
||||
*
|
||||
* const obj = { aa: 'a', ab: 'b', ac: 'c' };
|
||||
* console.log(mm.matchKeys(obj, '*b'));
|
||||
* //=> { ab: 'b' }
|
||||
* ```
|
||||
* @param {Object} `object` The object with keys to filter.
|
||||
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Object} Returns an object with only keys that match the given patterns.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.matchKeys = (obj, patterns, options) => {
|
||||
if (!utils.isObject(obj)) {
|
||||
throw new TypeError('Expected the first argument to be an object');
|
||||
}
|
||||
let keys = micromatch(Object.keys(obj), patterns, options);
|
||||
let res = {};
|
||||
for (let key of keys) res[key] = obj[key];
|
||||
return res;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.some(list, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
|
||||
* // true
|
||||
* console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
|
||||
* // false
|
||||
* ```
|
||||
* @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
|
||||
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Boolean} Returns true if any `patterns` matches any of the strings in `list`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.some = (list, patterns, options) => {
|
||||
let items = [].concat(list);
|
||||
|
||||
for (let pattern of [].concat(patterns)) {
|
||||
let isMatch = picomatch(String(pattern), options);
|
||||
if (items.some(item => isMatch(item))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if every string in the given `list` matches
|
||||
* any of the given glob `patterns`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.every(list, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.every('foo.js', ['foo.js']));
|
||||
* // true
|
||||
* console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
|
||||
* // true
|
||||
* console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
|
||||
* // false
|
||||
* console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
|
||||
* // false
|
||||
* ```
|
||||
* @param {String|Array} `list` The string or array of strings to test.
|
||||
* @param {String|Array} `patterns` One or more glob patterns to use for matching.
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Boolean} Returns true if all `patterns` matches all of the strings in `list`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.every = (list, patterns, options) => {
|
||||
let items = [].concat(list);
|
||||
|
||||
for (let pattern of [].concat(patterns)) {
|
||||
let isMatch = picomatch(String(pattern), options);
|
||||
if (!items.every(item => isMatch(item))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if **all** of the given `patterns` match
|
||||
* the specified string.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.all(string, patterns[, options]);
|
||||
*
|
||||
* console.log(mm.all('foo.js', ['foo.js']));
|
||||
* // true
|
||||
*
|
||||
* console.log(mm.all('foo.js', ['*.js', '!foo.js']));
|
||||
* // false
|
||||
*
|
||||
* console.log(mm.all('foo.js', ['*.js', 'foo.js']));
|
||||
* // true
|
||||
*
|
||||
* console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
|
||||
* // true
|
||||
* ```
|
||||
* @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) for changing how matches are performed
|
||||
* @return {Boolean} Returns true if any patterns match `str`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.all = (str, patterns, options) => {
|
||||
if (typeof str !== 'string') {
|
||||
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
||||
}
|
||||
|
||||
return [].concat(patterns).every(p => picomatch(p, options)(str));
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.capture(pattern, string[, options]);
|
||||
*
|
||||
* console.log(mm.capture('test/*.js', 'test/foo.js'));
|
||||
* //=> ['foo']
|
||||
* console.log(mm.capture('test/*.js', 'foo/bar.css'));
|
||||
* //=> null
|
||||
* ```
|
||||
* @param {String} `glob` Glob pattern to use for matching.
|
||||
* @param {String} `input` String to match
|
||||
* @param {Object} `options` See available [options](#options) for changing how matches are performed
|
||||
* @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.capture = (glob, input, options) => {
|
||||
let posix = utils.isWindows(options);
|
||||
let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
|
||||
let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
|
||||
|
||||
if (match) {
|
||||
return match.slice(1).map(v => v === void 0 ? '' : v);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a regular expression from the given glob `pattern`.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* // mm.makeRe(pattern[, options]);
|
||||
*
|
||||
* console.log(mm.makeRe('*.js'));
|
||||
* //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
|
||||
* ```
|
||||
* @param {String} `pattern` A glob pattern to convert to regex.
|
||||
* @param {Object} `options`
|
||||
* @return {RegExp} Returns a regex created from the given pattern.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.makeRe = (...args) => picomatch.makeRe(...args);
|
||||
|
||||
/**
|
||||
* Scan a glob pattern to separate the pattern into segments. Used
|
||||
* by the [split](#split) method.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* const state = mm.scan(pattern[, options]);
|
||||
* ```
|
||||
* @param {String} `pattern`
|
||||
* @param {Object} `options`
|
||||
* @return {Object} Returns an object with
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.scan = (...args) => picomatch.scan(...args);
|
||||
|
||||
/**
|
||||
* Parse a glob pattern to create the source string for a regular
|
||||
* expression.
|
||||
*
|
||||
* ```js
|
||||
* const mm = require('micromatch');
|
||||
* const state = mm.parse(pattern[, options]);
|
||||
* ```
|
||||
* @param {String} `glob`
|
||||
* @param {Object} `options`
|
||||
* @return {Object} Returns an object with useful properties and output to be used as regex source string.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.parse = (patterns, options) => {
|
||||
let res = [];
|
||||
for (let pattern of [].concat(patterns || [])) {
|
||||
for (let str of braces(String(pattern), options)) {
|
||||
res.push(picomatch.parse(str, options));
|
||||
}
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
/**
|
||||
* Process the given brace `pattern`.
|
||||
*
|
||||
* ```js
|
||||
* const { braces } = require('micromatch');
|
||||
* console.log(braces('foo/{a,b,c}/bar'));
|
||||
* //=> [ 'foo/(a|b|c)/bar' ]
|
||||
*
|
||||
* console.log(braces('foo/{a,b,c}/bar', { expand: true }));
|
||||
* //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
|
||||
* ```
|
||||
* @param {String} `pattern` String with brace pattern to process.
|
||||
* @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
|
||||
* @return {Array}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
micromatch.braces = (pattern, options) => {
|
||||
if (typeof pattern !== 'string') throw new TypeError('Expected a string');
|
||||
if ((options && options.nobrace === true) || !hasBraces(pattern)) {
|
||||
return [pattern];
|
||||
}
|
||||
return braces(pattern, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Expand braces
|
||||
*/
|
||||
|
||||
micromatch.braceExpand = (pattern, options) => {
|
||||
if (typeof pattern !== 'string') throw new TypeError('Expected a string');
|
||||
return micromatch.braces(pattern, { ...options, expand: true });
|
||||
};
|
||||
|
||||
/**
|
||||
* Expose micromatch
|
||||
*/
|
||||
|
||||
// exposed for tests
|
||||
micromatch.hasBraces = hasBraces;
|
||||
module.exports = micromatch;
|
||||
119
node_modules/micromatch/package.json
generated
vendored
119
node_modules/micromatch/package.json
generated
vendored
|
|
@ -1,119 +0,0 @@
|
|||
{
|
||||
"name": "micromatch",
|
||||
"description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.",
|
||||
"version": "4.0.8",
|
||||
"homepage": "https://github.com/micromatch/micromatch",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"(https://github.com/DianeLooney)",
|
||||
"Amila Welihinda (amilajack.com)",
|
||||
"Bogdan Chadkin (https://github.com/TrySound)",
|
||||
"Brian Woodward (https://twitter.com/doowb)",
|
||||
"Devon Govett (http://badassjs.com)",
|
||||
"Elan Shanker (https://github.com/es128)",
|
||||
"Fabrício Matté (https://ultcombo.js.org)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Martin Kolárik (https://kolarik.sk)",
|
||||
"Olsten Larck (https://i.am.charlike.online)",
|
||||
"Paul Miller (paulmillr.com)",
|
||||
"Tom Byrer (https://github.com/tomByrer)",
|
||||
"Tyler Akins (http://rumkin.com)",
|
||||
"Peter Bright <drpizza@quiscalusmexicanus.org> (https://github.com/drpizza)",
|
||||
"Kuba Juszczyk (https://github.com/ku8ar)"
|
||||
],
|
||||
"repository": "micromatch/micromatch",
|
||||
"bugs": {
|
||||
"url": "https://github.com/micromatch/micromatch/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"braces": "^3.0.3",
|
||||
"picomatch": "^2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"fill-range": "^7.0.1",
|
||||
"gulp-format-md": "^2.0.0",
|
||||
"minimatch": "^5.0.1",
|
||||
"mocha": "^9.2.2",
|
||||
"time-require": "github:jonschlinkert/time-require"
|
||||
},
|
||||
"keywords": [
|
||||
"bash",
|
||||
"bracket",
|
||||
"character-class",
|
||||
"expand",
|
||||
"expansion",
|
||||
"expression",
|
||||
"extglob",
|
||||
"extglobs",
|
||||
"file",
|
||||
"files",
|
||||
"filter",
|
||||
"find",
|
||||
"glob",
|
||||
"globbing",
|
||||
"globs",
|
||||
"globstar",
|
||||
"lookahead",
|
||||
"lookaround",
|
||||
"lookbehind",
|
||||
"match",
|
||||
"matcher",
|
||||
"matches",
|
||||
"matching",
|
||||
"micromatch",
|
||||
"minimatch",
|
||||
"multimatch",
|
||||
"negate",
|
||||
"negation",
|
||||
"path",
|
||||
"pattern",
|
||||
"patterns",
|
||||
"posix",
|
||||
"regex",
|
||||
"regexp",
|
||||
"regular",
|
||||
"shell",
|
||||
"star",
|
||||
"wildcard"
|
||||
],
|
||||
"verb": {
|
||||
"toc": "collapsible",
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
},
|
||||
"related": {
|
||||
"list": [
|
||||
"braces",
|
||||
"expand-brackets",
|
||||
"extglob",
|
||||
"fill-range",
|
||||
"nanomatch"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"extglob",
|
||||
"fill-range",
|
||||
"glob-object",
|
||||
"minimatch",
|
||||
"multimatch"
|
||||
]
|
||||
}
|
||||
}
|
||||
136
node_modules/picomatch/CHANGELOG.md
generated
vendored
136
node_modules/picomatch/CHANGELOG.md
generated
vendored
|
|
@ -1,136 +0,0 @@
|
|||
# Release history
|
||||
|
||||
**All notable changes to this project will be documented in this file.**
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
<details>
|
||||
<summary><strong>Guiding Principles</strong></summary>
|
||||
|
||||
- Changelogs are for humans, not machines.
|
||||
- There should be an entry for every single version.
|
||||
- The same types of changes should be grouped.
|
||||
- Versions and sections should be linkable.
|
||||
- The latest version comes first.
|
||||
- The release date of each versions is displayed.
|
||||
- Mention whether you follow Semantic Versioning.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Types of changes</strong></summary>
|
||||
|
||||
Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
|
||||
|
||||
- `Added` for new features.
|
||||
- `Changed` for changes in existing functionality.
|
||||
- `Deprecated` for soon-to-be removed features.
|
||||
- `Removed` for now removed features.
|
||||
- `Fixed` for any bug fixes.
|
||||
- `Security` in case of vulnerabilities.
|
||||
|
||||
</details>
|
||||
|
||||
## 2.3.1 (2022-01-02)
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixes bug when a pattern containing an expression after the closing parenthesis (`/!(*.d).{ts,tsx}`) was incorrectly converted to regexp ([9f241ef](https://github.com/micromatch/picomatch/commit/9f241ef)).
|
||||
|
||||
### Changed
|
||||
|
||||
* Some documentation improvements ([f81d236](https://github.com/micromatch/picomatch/commit/f81d236), [421e0e7](https://github.com/micromatch/picomatch/commit/421e0e7)).
|
||||
|
||||
## 2.3.0 (2021-05-21)
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef))
|
||||
|
||||
## 2.2.3 (2021-04-10)
|
||||
|
||||
### Fixed
|
||||
|
||||
* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)).
|
||||
* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)).
|
||||
|
||||
## 2.2.2 (2020-03-21)
|
||||
|
||||
### Fixed
|
||||
|
||||
* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)).
|
||||
|
||||
## 2.2.1 (2020-01-04)
|
||||
|
||||
* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals.
|
||||
|
||||
## 2.2.0 (2020-01-04)
|
||||
|
||||
* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f))
|
||||
* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`.
|
||||
|
||||
## 2.1.0 (2019-10-31)
|
||||
|
||||
* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92))
|
||||
* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650))
|
||||
* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c))
|
||||
* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9))
|
||||
* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625))
|
||||
* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0))
|
||||
* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8))
|
||||
* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07))
|
||||
* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45))
|
||||
* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34))
|
||||
* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55))
|
||||
* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03))
|
||||
* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87))
|
||||
* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d))
|
||||
* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa))
|
||||
* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d))
|
||||
* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54))
|
||||
* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367))
|
||||
* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569))
|
||||
* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77))
|
||||
* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038))
|
||||
* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd))
|
||||
|
||||
## 2.0.7 (2019-05-14)
|
||||
|
||||
* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71))
|
||||
* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e))
|
||||
* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279))
|
||||
* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44))
|
||||
|
||||
## 2.0.4 (2019-04-10)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez.
|
||||
- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza.
|
||||
|
||||
## 2.0.0 (2019-04-10)
|
||||
|
||||
### Added
|
||||
|
||||
- Adds support for `options.onIgnore`. See the readme for details
|
||||
- Adds support for `options.onResult`. See the readme for details
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- The unixify option was renamed to `windows`
|
||||
- caching and all related options and methods have been removed
|
||||
|
||||
## 1.0.0 (2018-11-05)
|
||||
|
||||
- adds `.onMatch` option
|
||||
- improvements to `.scan` method
|
||||
- numerous improvements and optimizations for matching and parsing
|
||||
- better windows path handling
|
||||
|
||||
## 0.1.0 - 2017-04-13
|
||||
|
||||
First release.
|
||||
|
||||
|
||||
[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog
|
||||
98
node_modules/picomatch/README.md
generated
vendored
98
node_modules/picomatch/README.md
generated
vendored
|
|
@ -107,7 +107,7 @@ console.log(isMatch('a/b.js')); //=> false
|
|||
|
||||
## API
|
||||
|
||||
### [picomatch](lib/picomatch.js#L32)
|
||||
### [picomatch](lib/picomatch.js#L31)
|
||||
|
||||
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.
|
||||
|
||||
|
|
@ -128,7 +128,24 @@ console.log(isMatch('a.a')); //=> false
|
|||
console.log(isMatch('a.b')); //=> true
|
||||
```
|
||||
|
||||
### [.test](lib/picomatch.js#L117)
|
||||
**Example without node.js**
|
||||
|
||||
For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
|
||||
|
||||
```js
|
||||
const picomatch = require('picomatch/posix');
|
||||
// the same API, defaulting to posix paths
|
||||
const isMatch = picomatch('a/*');
|
||||
console.log(isMatch('a\\b')); //=> false
|
||||
console.log(isMatch('a/b')); //=> true
|
||||
|
||||
// you can still configure the matcher function to accept windows paths
|
||||
const isMatch = picomatch('a/*', { options: windows });
|
||||
console.log(isMatch('a\\b')); //=> true
|
||||
console.log(isMatch('a/b')); //=> true
|
||||
```
|
||||
|
||||
### [.test](lib/picomatch.js#L116)
|
||||
|
||||
Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string.
|
||||
|
||||
|
|
@ -148,7 +165,7 @@ console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
|
|||
// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
|
||||
```
|
||||
|
||||
### [.matchBase](lib/picomatch.js#L161)
|
||||
### [.matchBase](lib/picomatch.js#L160)
|
||||
|
||||
Match the basename of a filepath.
|
||||
|
||||
|
|
@ -166,7 +183,7 @@ const picomatch = require('picomatch');
|
|||
console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
|
||||
```
|
||||
|
||||
### [.isMatch](lib/picomatch.js#L183)
|
||||
### [.isMatch](lib/picomatch.js#L182)
|
||||
|
||||
Returns true if **any** of the given glob `patterns` match the specified `string`.
|
||||
|
||||
|
|
@ -187,7 +204,7 @@ console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
|
|||
console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
|
||||
```
|
||||
|
||||
### [.parse](lib/picomatch.js#L199)
|
||||
### [.parse](lib/picomatch.js#L198)
|
||||
|
||||
Parse a glob pattern to create the source string for a regular expression.
|
||||
|
||||
|
|
@ -204,7 +221,7 @@ const picomatch = require('picomatch');
|
|||
const result = picomatch.parse(pattern[, options]);
|
||||
```
|
||||
|
||||
### [.scan](lib/picomatch.js#L231)
|
||||
### [.scan](lib/picomatch.js#L230)
|
||||
|
||||
Scan a glob pattern to separate the pattern into segments.
|
||||
|
||||
|
|
@ -235,7 +252,7 @@ console.log(result);
|
|||
negated: true }
|
||||
```
|
||||
|
||||
### [.compileRe](lib/picomatch.js#L245)
|
||||
### [.compileRe](lib/picomatch.js#L244)
|
||||
|
||||
Compile a regular expression from the `state` object returned by the
|
||||
[parse()](#parse) method.
|
||||
|
|
@ -248,7 +265,7 @@ Compile a regular expression from the `state` object returned by the
|
|||
* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
|
||||
* `returns` **{RegExp}**
|
||||
|
||||
### [.makeRe](lib/picomatch.js#L286)
|
||||
### [.makeRe](lib/picomatch.js#L285)
|
||||
|
||||
Create a regular expression from a parsed glob pattern.
|
||||
|
||||
|
|
@ -271,7 +288,7 @@ console.log(picomatch.compileRe(state));
|
|||
//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
|
||||
```
|
||||
|
||||
### [.toRegex](lib/picomatch.js#L321)
|
||||
### [.toRegex](lib/picomatch.js#L320)
|
||||
|
||||
Create a regular expression from the given regex source string.
|
||||
|
||||
|
|
@ -318,7 +335,7 @@ The following options may be used with the main `picomatch()` function or any of
|
|||
| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. |
|
||||
| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
|
||||
| `matchBase` | `boolean` | `false` | Alias for `basename` |
|
||||
| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
|
||||
| `maxLength` | `number` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
|
||||
| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
|
||||
| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
|
||||
| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
|
||||
|
|
@ -339,8 +356,7 @@ The following options may be used with the main `picomatch()` function or any of
|
|||
| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
|
||||
| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
|
||||
| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
|
||||
|
||||
picomatch has automatic detection for regex positive and negative lookbehinds. If the pattern contains a negative lookbehind, you must be using Node.js >= 8.10 or else picomatch will throw an error.
|
||||
| `windows` | `boolean` | `false` | Also accept backslashes as the path separator. |
|
||||
|
||||
### Scan Options
|
||||
|
||||
|
|
@ -484,7 +500,7 @@ isMatch('baz');
|
|||
| **Character** | **Description** |
|
||||
| --- | --- |
|
||||
| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. |
|
||||
| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. |
|
||||
| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` with the `windows` option) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. |
|
||||
| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. |
|
||||
| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. |
|
||||
|
||||
|
|
@ -524,9 +540,9 @@ console.log(pm.isMatch('az', 'a*(z)')); // true
|
|||
console.log(pm.isMatch('azzz', 'a*(z)')); // true
|
||||
|
||||
// +(pattern) matches ONE or more of "pattern"
|
||||
console.log(pm.isMatch('a', 'a*(z)')); // true
|
||||
console.log(pm.isMatch('az', 'a*(z)')); // true
|
||||
console.log(pm.isMatch('azzz', 'a*(z)')); // true
|
||||
console.log(pm.isMatch('a', 'a+(z)')); // false
|
||||
console.log(pm.isMatch('az', 'a+(z)')); // true
|
||||
console.log(pm.isMatch('azzz', 'a+(z)')); // true
|
||||
|
||||
// supports multiple extglobs
|
||||
console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false
|
||||
|
|
@ -613,30 +629,44 @@ The following table shows which features are supported by [minimatch](https://gi
|
|||
|
||||
Performance comparison of picomatch and minimatch.
|
||||
|
||||
_(Pay special attention to the last three benchmarks. Minimatch freezes on long ranges.)_
|
||||
|
||||
```
|
||||
# .makeRe star
|
||||
picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled)
|
||||
minimatch x 627,206 ops/sec ±1.96% (87 runs sampled))
|
||||
# .makeRe star (*)
|
||||
picomatch x 4,449,159 ops/sec ±0.24% (97 runs sampled)
|
||||
minimatch x 632,772 ops/sec ±0.14% (98 runs sampled)
|
||||
|
||||
# .makeRe star; dot=true
|
||||
picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled)
|
||||
minimatch x 525,876 ops/sec ±0.60% (88 runs sampled)
|
||||
# .makeRe star; dot=true (*)
|
||||
picomatch x 3,500,079 ops/sec ±0.26% (99 runs sampled)
|
||||
minimatch x 564,916 ops/sec ±0.23% (96 runs sampled)
|
||||
|
||||
# .makeRe globstar
|
||||
picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled)
|
||||
minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d)
|
||||
# .makeRe globstar (**)
|
||||
picomatch x 3,261,000 ops/sec ±0.27% (98 runs sampled)
|
||||
minimatch x 1,664,766 ops/sec ±0.20% (100 runs sampled)
|
||||
|
||||
# .makeRe globstars
|
||||
picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled)
|
||||
minimatch x 477,179 ops/sec ±1.33% (91 runs sampled)
|
||||
# .makeRe globstars (**/**/**)
|
||||
picomatch x 3,284,469 ops/sec ±0.18% (97 runs sampled)
|
||||
minimatch x 1,435,880 ops/sec ±0.34% (95 runs sampled)
|
||||
|
||||
# .makeRe with leading star
|
||||
picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled)
|
||||
minimatch x 453,564 ops/sec ±1.43% (94 runs sampled)
|
||||
# .makeRe with leading star (*.txt)
|
||||
picomatch x 3,100,197 ops/sec ±0.35% (99 runs sampled)
|
||||
minimatch x 428,347 ops/sec ±0.42% (94 runs sampled)
|
||||
|
||||
# .makeRe - basic braces
|
||||
picomatch x 392,067 ops/sec ±0.70% (90 runs sampled)
|
||||
minimatch x 99,532 ops/sec ±2.03% (87 runs sampled))
|
||||
# .makeRe - basic braces ({a,b,c}*.txt)
|
||||
picomatch x 443,578 ops/sec ±1.33% (89 runs sampled)
|
||||
minimatch x 107,143 ops/sec ±0.35% (94 runs sampled)
|
||||
|
||||
# .makeRe - short ranges ({a..z}*.txt)
|
||||
picomatch x 415,484 ops/sec ±0.76% (96 runs sampled)
|
||||
minimatch x 14,299 ops/sec ±0.26% (96 runs sampled)
|
||||
|
||||
# .makeRe - medium ranges ({1..100000}*.txt)
|
||||
picomatch x 395,020 ops/sec ±0.87% (89 runs sampled)
|
||||
minimatch x 2 ops/sec ±4.59% (10 runs sampled)
|
||||
|
||||
# .makeRe - long ranges ({1..10000000}*.txt)
|
||||
picomatch x 400,036 ops/sec ±0.83% (90 runs sampled)
|
||||
minimatch (FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory)
|
||||
```
|
||||
|
||||
<br>
|
||||
|
|
|
|||
16
node_modules/picomatch/index.js
generated
vendored
16
node_modules/picomatch/index.js
generated
vendored
|
|
@ -1,3 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = require('./lib/picomatch');
|
||||
const pico = require('./lib/picomatch');
|
||||
const utils = require('./lib/utils');
|
||||
|
||||
function picomatch(glob, options, returnState = false) {
|
||||
// default to os.platform()
|
||||
if (options && (options.windows === null || options.windows === undefined)) {
|
||||
// don't mutate the original options object
|
||||
options = { ...options, windows: utils.isWindows() };
|
||||
}
|
||||
|
||||
return pico(glob, options, returnState);
|
||||
}
|
||||
|
||||
Object.assign(picomatch, pico);
|
||||
module.exports = picomatch;
|
||||
|
|
|
|||
11
node_modules/picomatch/lib/constants.js
generated
vendored
11
node_modules/picomatch/lib/constants.js
generated
vendored
|
|
@ -1,6 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const WIN_SLASH = '\\\\/';
|
||||
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
||||
|
||||
|
|
@ -23,6 +22,7 @@ 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 SEP = '/';
|
||||
|
||||
const POSIX_CHARS = {
|
||||
DOT_LITERAL,
|
||||
|
|
@ -39,7 +39,8 @@ const POSIX_CHARS = {
|
|||
NO_DOTS_SLASH,
|
||||
QMARK_NO_DOT,
|
||||
STAR,
|
||||
START_ANCHOR
|
||||
START_ANCHOR,
|
||||
SEP
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +60,8 @@ const WINDOWS_CHARS = {
|
|||
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
||||
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
|
||||
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
|
||||
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
|
||||
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
|
||||
SEP: '\\'
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -97,6 +99,7 @@ module.exports = {
|
|||
|
||||
// Replace globs with equivalent patterns to reduce parsing time.
|
||||
REPLACEMENTS: {
|
||||
__proto__: null,
|
||||
'***': '*',
|
||||
'**/**': '**',
|
||||
'**/**/**': '**'
|
||||
|
|
@ -153,8 +156,6 @@ module.exports = {
|
|||
CHAR_VERTICAL_LINE: 124, /* | */
|
||||
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
|
||||
|
||||
SEP: path.sep,
|
||||
|
||||
/**
|
||||
* Create EXTGLOB_CHARS
|
||||
*/
|
||||
|
|
|
|||
12
node_modules/picomatch/lib/parse.js
generated
vendored
12
node_modules/picomatch/lib/parse.js
generated
vendored
|
|
@ -71,10 +71,9 @@ const parse = (input, options) => {
|
|||
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 PLATFORM_CHARS = constants.globChars(opts.windows);
|
||||
const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
|
||||
|
||||
const {
|
||||
|
|
@ -210,8 +209,8 @@ const parse = (input, options) => {
|
|||
|
||||
if (tok.value || tok.output) append(tok);
|
||||
if (prev && prev.type === 'text' && tok.type === 'text') {
|
||||
prev.output = (prev.output || prev.value) + tok.value;
|
||||
prev.value += tok.value;
|
||||
prev.output = (prev.output || '') + tok.value;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -699,10 +698,6 @@ const parse = (input, options) => {
|
|||
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}`;
|
||||
}
|
||||
|
|
@ -1010,7 +1005,6 @@ parse.fastpaths = (input, options) => {
|
|||
}
|
||||
|
||||
input = REPLACEMENTS[input] || input;
|
||||
const win32 = utils.isWindows(options);
|
||||
|
||||
// create constants based on platform, for windows or posix
|
||||
const {
|
||||
|
|
@ -1023,7 +1017,7 @@ parse.fastpaths = (input, options) => {
|
|||
NO_DOTS_SLASH,
|
||||
STAR,
|
||||
START_ANCHOR
|
||||
} = constants.globChars(win32);
|
||||
} = constants.globChars(opts.windows);
|
||||
|
||||
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
||||
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
||||
|
|
|
|||
7
node_modules/picomatch/lib/picomatch.js
generated
vendored
7
node_modules/picomatch/lib/picomatch.js
generated
vendored
|
|
@ -1,6 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const scan = require('./scan');
|
||||
const parse = require('./parse');
|
||||
const utils = require('./utils');
|
||||
|
|
@ -49,7 +48,7 @@ const picomatch = (glob, options, returnState = false) => {
|
|||
}
|
||||
|
||||
const opts = options || {};
|
||||
const posix = utils.isWindows(options);
|
||||
const posix = opts.windows;
|
||||
const regex = isState
|
||||
? picomatch.compileRe(glob, options)
|
||||
: picomatch.makeRe(glob, options, false, true);
|
||||
|
|
@ -158,9 +157,9 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
||||
picomatch.matchBase = (input, glob, options) => {
|
||||
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
||||
return regex.test(path.basename(input));
|
||||
return regex.test(utils.basename(input));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
42
node_modules/picomatch/lib/utils.js
generated
vendored
42
node_modules/picomatch/lib/utils.js
generated
vendored
|
|
@ -1,7 +1,6 @@
|
|||
/*global navigator*/
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const win32 = process.platform === 'win32';
|
||||
const {
|
||||
REGEX_BACKSLASH,
|
||||
REGEX_REMOVE_BACKSLASH,
|
||||
|
|
@ -15,27 +14,25 @@ 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.isWindows = () => {
|
||||
if (typeof navigator !== 'undefined' && navigator.platform) {
|
||||
const platform = navigator.platform.toLowerCase();
|
||||
return platform === 'win32' || platform === 'windows';
|
||||
}
|
||||
|
||||
if (typeof process !== 'undefined' && process.platform) {
|
||||
return process.platform === 'win32';
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
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;
|
||||
|
|
@ -62,3 +59,14 @@ exports.wrapOutput = (input, state = {}, options = {}) => {
|
|||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
exports.basename = (path, { windows } = {}) => {
|
||||
const segs = path.split(windows ? /[\\/]/ : '/');
|
||||
const last = segs[segs.length - 1];
|
||||
|
||||
if (last === '') {
|
||||
return segs[segs.length - 2];
|
||||
}
|
||||
|
||||
return last;
|
||||
};
|
||||
|
|
|
|||
12
node_modules/picomatch/package.json
generated
vendored
12
node_modules/picomatch/package.json
generated
vendored
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "picomatch",
|
||||
"description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
|
||||
"version": "2.3.1",
|
||||
"version": "4.0.3",
|
||||
"homepage": "https://github.com/micromatch/picomatch",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"funding": "https://github.com/sponsors/jonschlinkert",
|
||||
|
|
@ -12,11 +12,13 @@
|
|||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js",
|
||||
"posix.js",
|
||||
"lib"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
|
||||
|
|
@ -26,11 +28,11 @@
|
|||
"test:cover": "nyc npm run mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^6.8.0",
|
||||
"eslint": "^8.57.0",
|
||||
"fill-range": "^7.0.1",
|
||||
"gulp-format-md": "^2.0.0",
|
||||
"mocha": "^6.2.2",
|
||||
"nyc": "^15.0.0",
|
||||
"mocha": "^10.4.0",
|
||||
"nyc": "^15.1.0",
|
||||
"time-require": "github:jonschlinkert/time-require"
|
||||
},
|
||||
"keywords": [
|
||||
|
|
|
|||
3
node_modules/picomatch/posix.js
generated
vendored
Normal file
3
node_modules/picomatch/posix.js
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = require('./lib/picomatch');
|
||||
38
node_modules/tailwindcss/dist/chunk-CT46QCH7.mjs
generated
vendored
Normal file
38
node_modules/tailwindcss/dist/chunk-CT46QCH7.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
38
node_modules/tailwindcss/dist/chunk-MEY3PWYT.mjs
generated
vendored
38
node_modules/tailwindcss/dist/chunk-MEY3PWYT.mjs
generated
vendored
File diff suppressed because one or more lines are too long
4
node_modules/tailwindcss/dist/flatten-color-palette.js
generated
vendored
4
node_modules/tailwindcss/dist/flatten-color-palette.js
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/tailwindcss/dist/flatten-color-palette.mjs
generated
vendored
2
node_modules/tailwindcss/dist/flatten-color-palette.mjs
generated
vendored
|
|
@ -1 +1 @@
|
|||
import"./chunk-MEY3PWYT.mjs";import"./chunk-GFBUASX3.mjs";import"./chunk-HTB5LLOP.mjs";function i(r){let n={};for(let[e,t]of Object.entries(r??{}))if(e!=="__CSS_VALUES__")if(typeof t=="object"&&t!==null)for(let[o,f]of Object.entries(i(t)))n[`${e}${o==="DEFAULT"?"":`-${o}`}`]=f;else n[e]=t;if("__CSS_VALUES__"in r)for(let[e,t]of Object.entries(r.__CSS_VALUES__))(Number(t)&4)===0&&(n[e]=r[e]);return n}export{i as default};
|
||||
import"./chunk-CT46QCH7.mjs";import"./chunk-GFBUASX3.mjs";import"./chunk-HTB5LLOP.mjs";function i(r){let n={};for(let[e,t]of Object.entries(r??{}))if(e!=="__CSS_VALUES__")if(typeof t=="object"&&t!==null)for(let[o,f]of Object.entries(i(t)))n[`${e}${o==="DEFAULT"?"":`-${o}`}`]=f;else n[e]=t;if("__CSS_VALUES__"in r)for(let[e,t]of Object.entries(r.__CSS_VALUES__))(Number(t)&4)===0&&(n[e]=r[e]);return n}export{i as default};
|
||||
|
|
|
|||
5
node_modules/tailwindcss/dist/lib.d.mts
generated
vendored
5
node_modules/tailwindcss/dist/lib.d.mts
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
import { S as SourceLocation, U as UserConfig, P as Plugin } from './types-WlZgYgM8.mjs';
|
||||
import { S as SourceLocation, U as UserConfig, P as Plugin } from './types-CJYAW1ql.mjs';
|
||||
import { V as Variant, C as Candidate } from './resolve-config-QUZ9b-Gn.mjs';
|
||||
import './colors.mjs';
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ declare class Variants {
|
|||
compoundsWith: Compounds;
|
||||
compounds: Compounds;
|
||||
} | undefined;
|
||||
kind(name: string): "static" | "arbitrary" | "functional" | "compound";
|
||||
kind(name: string): "arbitrary" | "static" | "functional" | "compound";
|
||||
compoundsWith(parent: string, child: string | Variant): boolean;
|
||||
suggest(name: string, suggestions: () => string[]): void;
|
||||
getCompletions(name: string): string[];
|
||||
|
|
@ -214,6 +214,7 @@ type DesignSystem = {
|
|||
trackUsedVariables(raw: string): void;
|
||||
canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[];
|
||||
candidatesToCss(classes: string[]): (string | null)[];
|
||||
candidatesToAst(classes: string[]): AstNode[][];
|
||||
storage: Record<symbol, unknown>;
|
||||
};
|
||||
|
||||
|
|
|
|||
32
node_modules/tailwindcss/dist/lib.js
generated
vendored
32
node_modules/tailwindcss/dist/lib.js
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/tailwindcss/dist/lib.mjs
generated
vendored
2
node_modules/tailwindcss/dist/lib.mjs
generated
vendored
|
|
@ -1 +1 @@
|
|||
import{a,b,c,d,e,f}from"./chunk-MEY3PWYT.mjs";import"./chunk-GFBUASX3.mjs";import"./chunk-HTB5LLOP.mjs";export{b as Features,a as Polyfills,e as __unstable__loadDesignSystem,d as compile,c as compileAst,f as default};
|
||||
import{a,b,c,d,e,f}from"./chunk-CT46QCH7.mjs";import"./chunk-GFBUASX3.mjs";import"./chunk-HTB5LLOP.mjs";export{b as Features,a as Polyfills,e as __unstable__loadDesignSystem,d as compile,c as compileAst,f as default};
|
||||
|
|
|
|||
4
node_modules/tailwindcss/dist/plugin.d.mts
generated
vendored
4
node_modules/tailwindcss/dist/plugin.d.mts
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
export { P as PluginUtils } from './resolve-config-QUZ9b-Gn.mjs';
|
||||
import { a as PluginFn, C as Config, b as PluginWithConfig, c as PluginWithOptions } from './types-WlZgYgM8.mjs';
|
||||
export { d as PluginAPI, P as PluginsConfig, T as ThemeConfig } from './types-WlZgYgM8.mjs';
|
||||
import { a as PluginFn, C as Config, b as PluginWithConfig, c as PluginWithOptions } from './types-CJYAW1ql.mjs';
|
||||
export { d as PluginAPI, P as PluginsConfig, T as ThemeConfig } from './types-CJYAW1ql.mjs';
|
||||
import './colors.mjs';
|
||||
|
||||
declare function createPlugin(handler: PluginFn, config?: Partial<Config>): PluginWithConfig;
|
||||
|
|
|
|||
3
node_modules/tailwindcss/dist/plugin.d.ts
generated
vendored
3
node_modules/tailwindcss/dist/plugin.d.ts
generated
vendored
|
|
@ -122,6 +122,9 @@ interface UserConfig {
|
|||
interface UserConfig {
|
||||
future?: 'all' | Record<string, boolean>;
|
||||
}
|
||||
interface UserConfig {
|
||||
experimental?: 'all' | Record<string, boolean>;
|
||||
}
|
||||
|
||||
declare function createPlugin(handler: PluginFn, config?: Partial<Config>): PluginWithConfig;
|
||||
declare namespace createPlugin {
|
||||
|
|
|
|||
|
|
@ -121,5 +121,8 @@ interface UserConfig {
|
|||
interface UserConfig {
|
||||
future?: 'all' | Record<string, boolean>;
|
||||
}
|
||||
interface UserConfig {
|
||||
experimental?: 'all' | Record<string, boolean>;
|
||||
}
|
||||
|
||||
export type { Config as C, Plugin as P, SourceLocation as S, ThemeConfig as T, UserConfig as U, PluginFn as a, PluginWithConfig as b, PluginWithOptions as c, PluginAPI as d };
|
||||
4
node_modules/tailwindcss/package.json
generated
vendored
4
node_modules/tailwindcss/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "tailwindcss",
|
||||
"version": "4.1.17",
|
||||
"version": "4.1.18",
|
||||
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
"lightningcss": "1.30.2",
|
||||
"magic-string": "^0.30.21",
|
||||
"source-map-js": "^1.2.1",
|
||||
"@tailwindcss/oxide": "^4.1.17"
|
||||
"@tailwindcss/oxide": "^4.1.18"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "tsc --noEmit",
|
||||
|
|
|
|||
21
node_modules/to-regex-range/LICENSE
generated
vendored
21
node_modules/to-regex-range/LICENSE
generated
vendored
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-present, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
305
node_modules/to-regex-range/README.md
generated
vendored
305
node_modules/to-regex-range/README.md
generated
vendored
|
|
@ -1,305 +0,0 @@
|
|||
# to-regex-range [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [](https://www.npmjs.com/package/to-regex-range) [](https://npmjs.org/package/to-regex-range) [](https://npmjs.org/package/to-regex-range) [](https://travis-ci.org/micromatch/to-regex-range)
|
||||
|
||||
> Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save to-regex-range
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><strong>What does this do?</strong></summary>
|
||||
|
||||
<br>
|
||||
|
||||
This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
const toRegexRange = require('to-regex-range');
|
||||
const regex = new RegExp(toRegexRange('15', '95'));
|
||||
```
|
||||
|
||||
A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string).
|
||||
|
||||
<br>
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Why use this library?</strong></summary>
|
||||
|
||||
<br>
|
||||
|
||||
### Convenience
|
||||
|
||||
Creating regular expressions for matching numbers gets deceptively complicated pretty fast.
|
||||
|
||||
For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc:
|
||||
|
||||
* regex for matching `1` => `/1/` (easy enough)
|
||||
* regex for matching `1` through `5` => `/[1-5]/` (not bad...)
|
||||
* regex for matching `1` or `5` => `/(1|5)/` (still easy...)
|
||||
* regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...)
|
||||
* regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...)
|
||||
* regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...)
|
||||
* regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!)
|
||||
|
||||
The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation.
|
||||
|
||||
**Learn more**
|
||||
|
||||
If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful.
|
||||
|
||||
### Heavily tested
|
||||
|
||||
As of April 07, 2019, this library runs [>1m test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are correct.
|
||||
|
||||
Tests run in ~280ms on my MacBook Pro, 2.5 GHz Intel Core i7.
|
||||
|
||||
### Optimized
|
||||
|
||||
Generated regular expressions are optimized:
|
||||
|
||||
* duplicate sequences and character classes are reduced using quantifiers
|
||||
* smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative
|
||||
* uses fragment caching to avoid processing the same exact string more than once
|
||||
|
||||
<br>
|
||||
|
||||
</details>
|
||||
|
||||
## Usage
|
||||
|
||||
Add this library to your javascript application with the following line of code
|
||||
|
||||
```js
|
||||
const toRegexRange = require('to-regex-range');
|
||||
```
|
||||
|
||||
The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers).
|
||||
|
||||
```js
|
||||
const source = toRegexRange('15', '95');
|
||||
//=> 1[5-9]|[2-8][0-9]|9[0-5]
|
||||
|
||||
const regex = new RegExp(`^${source}$`);
|
||||
console.log(regex.test('14')); //=> false
|
||||
console.log(regex.test('50')); //=> true
|
||||
console.log(regex.test('94')); //=> true
|
||||
console.log(regex.test('96')); //=> false
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### options.capture
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Deafault**: `undefined`
|
||||
|
||||
Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges.
|
||||
|
||||
```js
|
||||
console.log(toRegexRange('-10', '10'));
|
||||
//=> -[1-9]|-?10|[0-9]
|
||||
|
||||
console.log(toRegexRange('-10', '10', { capture: true }));
|
||||
//=> (-[1-9]|-?10|[0-9])
|
||||
```
|
||||
|
||||
### options.shorthand
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Deafault**: `undefined`
|
||||
|
||||
Use the regex shorthand for `[0-9]`:
|
||||
|
||||
```js
|
||||
console.log(toRegexRange('0', '999999'));
|
||||
//=> [0-9]|[1-9][0-9]{1,5}
|
||||
|
||||
console.log(toRegexRange('0', '999999', { shorthand: true }));
|
||||
//=> \d|[1-9]\d{1,5}
|
||||
```
|
||||
|
||||
### options.relaxZeros
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Default**: `true`
|
||||
|
||||
This option relaxes matching for leading zeros when when ranges are zero-padded.
|
||||
|
||||
```js
|
||||
const source = toRegexRange('-0010', '0010');
|
||||
const regex = new RegExp(`^${source}$`);
|
||||
console.log(regex.test('-10')); //=> true
|
||||
console.log(regex.test('-010')); //=> true
|
||||
console.log(regex.test('-0010')); //=> true
|
||||
console.log(regex.test('10')); //=> true
|
||||
console.log(regex.test('010')); //=> true
|
||||
console.log(regex.test('0010')); //=> true
|
||||
```
|
||||
|
||||
When `relaxZeros` is false, matching is strict:
|
||||
|
||||
```js
|
||||
const source = toRegexRange('-0010', '0010', { relaxZeros: false });
|
||||
const regex = new RegExp(`^${source}$`);
|
||||
console.log(regex.test('-10')); //=> false
|
||||
console.log(regex.test('-010')); //=> false
|
||||
console.log(regex.test('-0010')); //=> true
|
||||
console.log(regex.test('10')); //=> false
|
||||
console.log(regex.test('010')); //=> false
|
||||
console.log(regex.test('0010')); //=> true
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
| **Range** | **Result** | **Compile time** |
|
||||
| --- | --- | --- |
|
||||
| `toRegexRange(-10, 10)` | `-[1-9]\|-?10\|[0-9]` | _132μs_ |
|
||||
| `toRegexRange(-100, -10)` | `-1[0-9]\|-[2-9][0-9]\|-100` | _50μs_ |
|
||||
| `toRegexRange(-100, 100)` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _42μs_ |
|
||||
| `toRegexRange(001, 100)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|100` | _109μs_ |
|
||||
| `toRegexRange(001, 555)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _51μs_ |
|
||||
| `toRegexRange(0010, 1000)` | `0{0,2}1[0-9]\|0{0,2}[2-9][0-9]\|0?[1-9][0-9]{2}\|1000` | _31μs_ |
|
||||
| `toRegexRange(1, 50)` | `[1-9]\|[1-4][0-9]\|50` | _24μs_ |
|
||||
| `toRegexRange(1, 55)` | `[1-9]\|[1-4][0-9]\|5[0-5]` | _23μs_ |
|
||||
| `toRegexRange(1, 555)` | `[1-9]\|[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _30μs_ |
|
||||
| `toRegexRange(1, 5555)` | `[1-9]\|[1-9][0-9]{1,2}\|[1-4][0-9]{3}\|5[0-4][0-9]{2}\|55[0-4][0-9]\|555[0-5]` | _43μs_ |
|
||||
| `toRegexRange(111, 555)` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _38μs_ |
|
||||
| `toRegexRange(29, 51)` | `29\|[34][0-9]\|5[01]` | _24μs_ |
|
||||
| `toRegexRange(31, 877)` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _32μs_ |
|
||||
| `toRegexRange(5, 5)` | `5` | _8μs_ |
|
||||
| `toRegexRange(5, 6)` | `5\|6` | _11μs_ |
|
||||
| `toRegexRange(1, 2)` | `1\|2` | _6μs_ |
|
||||
| `toRegexRange(1, 5)` | `[1-5]` | _15μs_ |
|
||||
| `toRegexRange(1, 10)` | `[1-9]\|10` | _22μs_ |
|
||||
| `toRegexRange(1, 100)` | `[1-9]\|[1-9][0-9]\|100` | _25μs_ |
|
||||
| `toRegexRange(1, 1000)` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _31μs_ |
|
||||
| `toRegexRange(1, 10000)` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _34μs_ |
|
||||
| `toRegexRange(1, 100000)` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _36μs_ |
|
||||
| `toRegexRange(1, 1000000)` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _42μs_ |
|
||||
| `toRegexRange(1, 10000000)` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _42μs_ |
|
||||
|
||||
## Heads up!
|
||||
|
||||
**Order of arguments**
|
||||
|
||||
When the `min` is larger than the `max`, values will be flipped to create a valid range:
|
||||
|
||||
```js
|
||||
toRegexRange('51', '29');
|
||||
```
|
||||
|
||||
Is effectively flipped to:
|
||||
|
||||
```js
|
||||
toRegexRange('29', '51');
|
||||
//=> 29|[3-4][0-9]|5[0-1]
|
||||
```
|
||||
|
||||
**Steps / increments**
|
||||
|
||||
This library does not support steps (increments). A pr to add support would be welcome.
|
||||
|
||||
## History
|
||||
|
||||
### v2.0.0 - 2017-04-21
|
||||
|
||||
**New features**
|
||||
|
||||
Adds support for zero-padding!
|
||||
|
||||
### v1.0.0
|
||||
|
||||
**Optimizations**
|
||||
|
||||
Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching.
|
||||
|
||||
## Attribution
|
||||
|
||||
Inspired by the python library [range-regex](https://github.com/dimka665/range-regex).
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Related projects
|
||||
|
||||
You might also be interested in these projects:
|
||||
|
||||
* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by micromatch.")
|
||||
* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`")
|
||||
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
|
||||
* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.")
|
||||
* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.")
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 63 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 3 | [doowb](https://github.com/doowb) |
|
||||
| 2 | [realityking](https://github.com/realityking) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [GitHub Profile](https://github.com/jonschlinkert)
|
||||
* [Twitter Profile](https://twitter.com/jonschlinkert)
|
||||
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
||||
|
||||
Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)!
|
||||
|
||||
<a href="https://www.patreon.com/jonschlinkert">
|
||||
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="50">
|
||||
</a>
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 07, 2019._
|
||||
288
node_modules/to-regex-range/index.js
generated
vendored
288
node_modules/to-regex-range/index.js
generated
vendored
|
|
@ -1,288 +0,0 @@
|
|||
/*!
|
||||
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
||||
*
|
||||
* Copyright (c) 2015-present, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const isNumber = require('is-number');
|
||||
|
||||
const toRegexRange = (min, max, options) => {
|
||||
if (isNumber(min) === false) {
|
||||
throw new TypeError('toRegexRange: expected the first argument to be a number');
|
||||
}
|
||||
|
||||
if (max === void 0 || min === max) {
|
||||
return String(min);
|
||||
}
|
||||
|
||||
if (isNumber(max) === false) {
|
||||
throw new TypeError('toRegexRange: expected the second argument to be a number.');
|
||||
}
|
||||
|
||||
let opts = { relaxZeros: true, ...options };
|
||||
if (typeof opts.strictZeros === 'boolean') {
|
||||
opts.relaxZeros = opts.strictZeros === false;
|
||||
}
|
||||
|
||||
let relax = String(opts.relaxZeros);
|
||||
let shorthand = String(opts.shorthand);
|
||||
let capture = String(opts.capture);
|
||||
let wrap = String(opts.wrap);
|
||||
let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
|
||||
|
||||
if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
|
||||
return toRegexRange.cache[cacheKey].result;
|
||||
}
|
||||
|
||||
let a = Math.min(min, max);
|
||||
let b = Math.max(min, max);
|
||||
|
||||
if (Math.abs(a - b) === 1) {
|
||||
let result = min + '|' + max;
|
||||
if (opts.capture) {
|
||||
return `(${result})`;
|
||||
}
|
||||
if (opts.wrap === false) {
|
||||
return result;
|
||||
}
|
||||
return `(?:${result})`;
|
||||
}
|
||||
|
||||
let isPadded = hasPadding(min) || hasPadding(max);
|
||||
let state = { min, max, a, b };
|
||||
let positives = [];
|
||||
let negatives = [];
|
||||
|
||||
if (isPadded) {
|
||||
state.isPadded = isPadded;
|
||||
state.maxLen = String(state.max).length;
|
||||
}
|
||||
|
||||
if (a < 0) {
|
||||
let newMin = b < 0 ? Math.abs(b) : 1;
|
||||
negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
|
||||
a = state.a = 0;
|
||||
}
|
||||
|
||||
if (b >= 0) {
|
||||
positives = splitToPatterns(a, b, state, opts);
|
||||
}
|
||||
|
||||
state.negatives = negatives;
|
||||
state.positives = positives;
|
||||
state.result = collatePatterns(negatives, positives, opts);
|
||||
|
||||
if (opts.capture === true) {
|
||||
state.result = `(${state.result})`;
|
||||
} else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
|
||||
state.result = `(?:${state.result})`;
|
||||
}
|
||||
|
||||
toRegexRange.cache[cacheKey] = state;
|
||||
return state.result;
|
||||
};
|
||||
|
||||
function collatePatterns(neg, pos, options) {
|
||||
let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
|
||||
let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
|
||||
let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
|
||||
let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
|
||||
return subpatterns.join('|');
|
||||
}
|
||||
|
||||
function splitToRanges(min, max) {
|
||||
let nines = 1;
|
||||
let zeros = 1;
|
||||
|
||||
let stop = countNines(min, nines);
|
||||
let stops = new Set([max]);
|
||||
|
||||
while (min <= stop && stop <= max) {
|
||||
stops.add(stop);
|
||||
nines += 1;
|
||||
stop = countNines(min, nines);
|
||||
}
|
||||
|
||||
stop = countZeros(max + 1, zeros) - 1;
|
||||
|
||||
while (min < stop && stop <= max) {
|
||||
stops.add(stop);
|
||||
zeros += 1;
|
||||
stop = countZeros(max + 1, zeros) - 1;
|
||||
}
|
||||
|
||||
stops = [...stops];
|
||||
stops.sort(compare);
|
||||
return stops;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a range to a regex pattern
|
||||
* @param {Number} `start`
|
||||
* @param {Number} `stop`
|
||||
* @return {String}
|
||||
*/
|
||||
|
||||
function rangeToPattern(start, stop, options) {
|
||||
if (start === stop) {
|
||||
return { pattern: start, count: [], digits: 0 };
|
||||
}
|
||||
|
||||
let zipped = zip(start, stop);
|
||||
let digits = zipped.length;
|
||||
let pattern = '';
|
||||
let count = 0;
|
||||
|
||||
for (let i = 0; i < digits; i++) {
|
||||
let [startDigit, stopDigit] = zipped[i];
|
||||
|
||||
if (startDigit === stopDigit) {
|
||||
pattern += startDigit;
|
||||
|
||||
} else if (startDigit !== '0' || stopDigit !== '9') {
|
||||
pattern += toCharacterClass(startDigit, stopDigit, options);
|
||||
|
||||
} else {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (count) {
|
||||
pattern += options.shorthand === true ? '\\d' : '[0-9]';
|
||||
}
|
||||
|
||||
return { pattern, count: [count], digits };
|
||||
}
|
||||
|
||||
function splitToPatterns(min, max, tok, options) {
|
||||
let ranges = splitToRanges(min, max);
|
||||
let tokens = [];
|
||||
let start = min;
|
||||
let prev;
|
||||
|
||||
for (let i = 0; i < ranges.length; i++) {
|
||||
let max = ranges[i];
|
||||
let obj = rangeToPattern(String(start), String(max), options);
|
||||
let zeros = '';
|
||||
|
||||
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
|
||||
if (prev.count.length > 1) {
|
||||
prev.count.pop();
|
||||
}
|
||||
|
||||
prev.count.push(obj.count[0]);
|
||||
prev.string = prev.pattern + toQuantifier(prev.count);
|
||||
start = max + 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tok.isPadded) {
|
||||
zeros = padZeros(max, tok, options);
|
||||
}
|
||||
|
||||
obj.string = zeros + obj.pattern + toQuantifier(obj.count);
|
||||
tokens.push(obj);
|
||||
start = max + 1;
|
||||
prev = obj;
|
||||
}
|
||||
|
||||
return tokens;
|
||||
}
|
||||
|
||||
function filterPatterns(arr, comparison, prefix, intersection, options) {
|
||||
let result = [];
|
||||
|
||||
for (let ele of arr) {
|
||||
let { string } = ele;
|
||||
|
||||
// only push if _both_ are negative...
|
||||
if (!intersection && !contains(comparison, 'string', string)) {
|
||||
result.push(prefix + string);
|
||||
}
|
||||
|
||||
// or _both_ are positive
|
||||
if (intersection && contains(comparison, 'string', string)) {
|
||||
result.push(prefix + string);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Zip strings
|
||||
*/
|
||||
|
||||
function zip(a, b) {
|
||||
let arr = [];
|
||||
for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
|
||||
return arr;
|
||||
}
|
||||
|
||||
function compare(a, b) {
|
||||
return a > b ? 1 : b > a ? -1 : 0;
|
||||
}
|
||||
|
||||
function contains(arr, key, val) {
|
||||
return arr.some(ele => ele[key] === val);
|
||||
}
|
||||
|
||||
function countNines(min, len) {
|
||||
return Number(String(min).slice(0, -len) + '9'.repeat(len));
|
||||
}
|
||||
|
||||
function countZeros(integer, zeros) {
|
||||
return integer - (integer % Math.pow(10, zeros));
|
||||
}
|
||||
|
||||
function toQuantifier(digits) {
|
||||
let [start = 0, stop = ''] = digits;
|
||||
if (stop || start > 1) {
|
||||
return `{${start + (stop ? ',' + stop : '')}}`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function toCharacterClass(a, b, options) {
|
||||
return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
|
||||
}
|
||||
|
||||
function hasPadding(str) {
|
||||
return /^-?(0+)\d/.test(str);
|
||||
}
|
||||
|
||||
function padZeros(value, tok, options) {
|
||||
if (!tok.isPadded) {
|
||||
return value;
|
||||
}
|
||||
|
||||
let diff = Math.abs(tok.maxLen - String(value).length);
|
||||
let relax = options.relaxZeros !== false;
|
||||
|
||||
switch (diff) {
|
||||
case 0:
|
||||
return '';
|
||||
case 1:
|
||||
return relax ? '0?' : '0';
|
||||
case 2:
|
||||
return relax ? '0{0,2}' : '00';
|
||||
default: {
|
||||
return relax ? `0{0,${diff}}` : `0{${diff}}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache
|
||||
*/
|
||||
|
||||
toRegexRange.cache = {};
|
||||
toRegexRange.clearCache = () => (toRegexRange.cache = {});
|
||||
|
||||
/**
|
||||
* Expose `toRegexRange`
|
||||
*/
|
||||
|
||||
module.exports = toRegexRange;
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue