@qqbrowser/qbot-claw-launcher 0.9.65 → 0.9.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var L=exports&&exports.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.server=void 0,exports.setGlobalAuthClient=z,exports.getGlobalAuthClient=K,exports.watchParentProcess=W;const U=L(require("http")),w=L(require("fs")),I=L(require("path")),u=require("./config"),a=require("./utils"),r=require("./reportLog"),$=require("./installer"),G=require("./version"),y=require("./state"),R=require("child_process"),Q=require("./service"),J=require("./filePicker"),x=require("./fileSecurityCheck"),B=require("./authMiddleware"),H="\u9009\u62E9\u6587\u4EF6",M=10485760,F=10,b=!1,P={CANCELLED:"CANCELLED",INVALID_PARAMS:"INVALID_PARAMS",DIALOG_BUSY:"DIALOG_BUSY",DIALOG_TIMEOUT:"DIALOG_TIMEOUT",PLATFORM_NOT_SUPPORTED:"PLATFORM_NOT_SUPPORTED",INTERNAL_ERROR:"INTERNAL_ERROR"},q=require("./openai-proxy"),V=require("./api/auth-client");let v=new V.AuthClient({usePipe:!0});function z(d){v=d}function K(){return v}const C={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, PUT, DELETE, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Authorization, X-Requested-With","Access-Control-Max-Age":"86400"};function j(d){for(const[e,f]of Object.entries(C))d.setHeader(e,f)}exports.server=U.default.createServer(async(d,e)=>{const f=d.url||"";if(j(e),d.method==="OPTIONS"){e.writeHead(204,C),e.end();return}if(f.startsWith("/v1/")){await(0,q.handleOpenAIProxy)(d,e,v);return}if(f==="/api/version"){let n="unknown";try{n=(await(0,a.execCommand)(`"${u.NODE_BIN}" -v`)).trim(),(0,r.log)(`[version] node \u7248\u672C: ${n}`)}catch(g){(0,r.log)(`[version] \u83B7\u53D6 node \u7248\u672C\u5931\u8D25: ${g.message}`),n=`error: ${g.message}`}const o=await(0,a.getQBotClawVersion)()??"0.0.0";(0,r.log)(`[version] qbotclaw \u7248\u672C: ${o}`);let s="0.0.0";if(w.default.existsSync(u.MCPORTER_BIN))try{s=(await(0,a.execCommand)(`"${u.NODE_BIN}" "${u.MCPORTER_BIN}" --version`)).trim(),(0,r.log)(`[version] mcporter \u7248\u672C: ${s}`)}catch(g){(0,r.log)(`[version] \u83B7\u53D6 mcporter \u7248\u672C\u5931\u8D25: ${g.message}`),s=`error: ${g.message}`}let i="0.0.0";if(w.default.existsSync(u.PYTHON_BIN))try{i=(await(0,a.execCommand)(`"${u.PYTHON_BIN}" --version`)).trim(),(0,r.log)(`[version] python \u7248\u672C: ${i}`)}catch(g){(0,r.log)(`[version] \u83B7\u53D6 python \u7248\u672C\u5931\u8D25: ${g.message}`),i=`error: ${g.message}`}(0,a.sendJSON)(e,200,{status:"\u6210\u529F",launcher:G.LAUNCHER_VERSION,node:n,qbotclaw:o,mcporter:s,python:i});return}if(f==="/api/port"){const n=exports.server.address(),o=n&&typeof n=="object"?n.port:null,s=(0,y.readState)();(0,a.sendJSON)(e,200,{status:"\u6210\u529F",launcher:o,qbotclaw:s.gatewayPort??2e3,mcpHttp:s.mcpHttpPort??u.DEFAULT_MCP_HTTP_PORT,mcpWs:s.mcpWsPort??8765});return}if(f==="/api/status"){const n=(0,y.readState)(),o=[];if(n.gatewayPid)try{process.kill(n.gatewayPid,0)}catch{o.push(`gateway \u8FDB\u7A0B (pid: ${n.gatewayPid}) \u5DF2\u9000\u51FA`)}else o.push("gateway \u8FDB\u7A0B\u672A\u542F\u52A8\uFF08\u72B6\u6001\u4E2D\u65E0 gatewayPid\uFF09");const s=[{name:"gateway",port:n.gatewayPort},{name:"mcpHttp",port:n.mcpHttpPort},{name:"mcpWs",port:n.mcpWsPort}];for(const{name:i,port:g}of s){if(!g){o.push(`${i} \u7AEF\u53E3\u672A\u914D\u7F6E\uFF08\u72B6\u6001\u4E2D\u65E0\u5BF9\u5E94\u7AEF\u53E3\u53F7\uFF09`);continue}await(0,y.isPortAvailable)(g)&&o.push(`${i} \u7AEF\u53E3 (${g}) \u65E0\u670D\u52A1\u76D1\u542C`)}o.length===0?(0,a.sendJSON)(e,200,{ok:!0,message:"\u6240\u6709\u670D\u52A1\u8FD0\u884C\u6B63\u5E38"}):(0,a.sendJSON)(e,200,{ok:!1,message:o.join("\uFF1B")});return}if(f==="/api/restart"){try{const n=(0,y.readState)();if(n.gatewayPid)try{process.kill(n.gatewayPid,"SIGTERM"),(0,r.log)(`[restart] \u5DF2\u53D1\u9001 SIGTERM \u7ED9\u65E7 gateway \u8FDB\u7A0B pid: ${n.gatewayPid}`)}catch{(0,r.log)(`[restart] \u65E7 gateway \u8FDB\u7A0B ${n.gatewayPid} \u53EF\u80FD\u5DF2\u9000\u51FA\uFF0C\u5FFD\u7565`)}const{gatewayPid:o,gatewayPort:s,mcpHttpPort:i,mcpWsPort:g,...m}=n;(0,y.writeState)(m),(0,r.log)("[restart] \u5DF2\u6E05\u9664 gatewayPid, gatewayPort, mcpHttpPort, mcpWsPort"),await(0,$.configAndRunQBotClaw)(),(0,r.log)("[restart] QBotClaw gateway \u91CD\u542F\u5B8C\u6210");const c=(0,y.readState)(),l=exports.server.address(),t=l&&typeof l=="object"?l.port:null;(0,a.sendJSON)(e,200,{ok:!0,message:"QBotClaw gateway \u91CD\u542F\u6210\u529F",launcher:t,qbotclaw:c.gatewayPort??2e3,mcpHttp:c.mcpHttpPort??u.DEFAULT_MCP_HTTP_PORT,mcpWs:c.mcpWsPort??8765,gatewayToken:(0,Q.getOrCreateGatewayToken)()})}catch(n){(0,r.log)(`[restart] \u91CD\u542F\u5931\u8D25: ${n.message}`),(0,a.sendJSON)(e,500,{ok:!1,message:`\u91CD\u542F\u5931\u8D25: ${n.message}`})}return}if(f==="/api/wechat/history"){try{if(!w.default.existsSync(u.SESSIONS_FILE)){(0,a.sendJSON)(e,404,{ok:!1,sessionKey:"",message:"\u672A\u627E\u5230\u4F1A\u8BDD\u6587\u4EF6"});return}const n=JSON.parse(w.default.readFileSync(u.SESSIONS_FILE,"utf-8"));let o=null,s=0;for(const[m,c]of Object.entries(n))if(m.includes("openclaw-weixin")){const t=c.updatedAt??0;t>s&&(s=t,o=m)}if(!o){(0,a.sendJSON)(e,404,{ok:!1,sessionKey:"",message:"\u672A\u627E\u5230\u5FAE\u4FE1\u4F1A\u8BDD"});return}const g=o.split(":").slice(4).join(":");(0,a.sendJSON)(e,200,{ok:!0,sessionKey:g,message:"\u83B7\u53D6\u6210\u529F"})}catch(n){(0,r.log)(`[wechat/history] \u8BFB\u53D6\u5FAE\u4FE1\u4F1A\u8BDD\u5931\u8D25: ${n.message}`),(0,a.sendJSON)(e,500,{ok:!1,sessionKey:"",message:`\u8BFB\u53D6\u5FAE\u4FE1\u4F1A\u8BDD\u5931\u8D25: ${n.message}`})}return}if(f==="/api/installing"){(0,a.sendJSON)(e,200,{installing:$.isInstalling});return}if(f==="/api/install"||f.startsWith("/api/install?")){if($.installState.status==="downloading"){(0,a.sendJSON)(e,200,{ok:"downloading",message:"\u6B63\u5728\u5B89\u88C5\u4E2D..."});return}const n=new URL(f,"http://localhost"),o=n.searchParams.get("version")||void 0,s=n.searchParams.get("overrideConfig")==="true";if(!o){(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:"\u7F3A\u5C11\u5FC5\u8981\u53C2\u6570 version\uFF0C\u7528\u6CD5: GET /api/install?version=x.x.x"});return}e.writeHead(200,{...C,"Content-Type":"text/plain; charset=utf-8","Transfer-Encoding":"chunked","Cache-Control":"no-cache"}),(0,$.runInstall)(e,o,s);return}if(f.startsWith("/api/watch")){const o=new URL(f,"http://localhost").searchParams.get("ppid");if(!o||isNaN(Number(o))){(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:"\u7F3A\u5C11\u6709\u6548\u7684 ppid \u53C2\u6570\uFF0C\u7528\u6CD5: GET /api/watch?ppid=12345"});return}const s=parseInt(o,10);try{process.kill(s,0)}catch{(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:`\u8FDB\u7A0B ${s} \u4E0D\u5B58\u5728`});return}const i=(0,y.readState)();(0,y.writeState)({...i,ppid:s}),W(s),(0,a.sendJSON)(e,200,{status:"\u6210\u529F",message:`\u5DF2\u5F00\u59CB\u76D1\u63A7\u7236\u8FDB\u7A0B ppid: ${s}`});return}if(f==="/api/qbotclaw"&&d.method==="POST"){let n="";d.on("data",o=>{n+=o.toString()}),d.on("end",()=>{let o;try{const s=JSON.parse(n);if(!Array.isArray(s.args)||s.args.length===0){(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:"\u53C2\u6570 args \u5FC5\u987B\u662F\u975E\u7A7A\u6570\u7EC4"});return}o=s.args.map(i=>String(i))}catch{(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:"\u8BF7\u6C42\u4F53\u5FC5\u987B\u662F\u5408\u6CD5\u7684 JSON"});return}if(!w.default.existsSync(u.QBOTCLAW_BIN)){(0,a.sendJSON)(e,404,{status:"\u5931\u8D25",message:`qbotclaw \u53EF\u6267\u884C\u6587\u4EF6\u4E0D\u5B58\u5728: ${u.QBOTCLAW_BIN}`});return}e.writeHead(200,{...C,"Content-Type":"text/plain; charset=utf-8","Transfer-Encoding":"chunked","Cache-Control":"no-cache"}),(0,$.runQBotClaw)(o,e).then(()=>{e.end(`
1
+ "use strict";var L=exports&&exports.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.server=void 0,exports.setGlobalAuthClient=z,exports.getGlobalAuthClient=K,exports.watchParentProcess=W;const U=L(require("http")),w=L(require("fs")),I=L(require("path")),u=require("./config"),a=require("./utils"),r=require("./reportLog"),$=require("./installer"),G=require("./version"),y=require("./state"),R=require("child_process"),Q=require("./service"),J=require("./filePicker"),x=require("./fileSecurityCheck"),B=require("./authMiddleware"),H="\u9009\u62E9\u6587\u4EF6",M=10485760,F=10,b=!1,P={CANCELLED:"CANCELLED",INVALID_PARAMS:"INVALID_PARAMS",DIALOG_BUSY:"DIALOG_BUSY",DIALOG_TIMEOUT:"DIALOG_TIMEOUT",PLATFORM_NOT_SUPPORTED:"PLATFORM_NOT_SUPPORTED",INTERNAL_ERROR:"INTERNAL_ERROR"},q=require("./openai-proxy"),V=require("./api/auth-client");let v=new V.AuthClient({usePipe:!0});function z(d){v=d}function K(){return v}const C={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, PUT, DELETE, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Authorization, X-Requested-With","Access-Control-Max-Age":"86400"};function j(d){for(const[e,f]of Object.entries(C))d.setHeader(e,f)}exports.server=U.default.createServer(async(d,e)=>{const f=d.url||"";if(j(e),d.method==="OPTIONS"){e.writeHead(204,C),e.end();return}if(f.startsWith("/v1/")){await(0,q.handleOpenAIProxy)(d,e,v);return}if(f==="/api/version"){let n="unknown";try{n=(await(0,a.execCommand)(`"${u.NODE_BIN}" -v`)).trim(),(0,r.log)(`[version] node \u7248\u672C: ${n}`)}catch(g){(0,r.log)(`[version] \u83B7\u53D6 node \u7248\u672C\u5931\u8D25: ${g.message}`),n=`error: ${g.message}`}const o=await(0,a.getQBotClawVersion)()??"0.0.0";(0,r.log)(`[version] qbotclaw \u7248\u672C: ${o}`);let s="0.0.0";if(w.default.existsSync(u.MCPORTER_BIN))try{s=(await(0,a.execCommand)(`"${u.NODE_BIN}" "${u.MCPORTER_BIN}" --version`)).trim(),(0,r.log)(`[version] mcporter \u7248\u672C: ${s}`)}catch(g){(0,r.log)(`[version] \u83B7\u53D6 mcporter \u7248\u672C\u5931\u8D25: ${g.message}`),s=`error: ${g.message}`}let i="0.0.0";if(w.default.existsSync(u.PYTHON_BIN))try{i=(await(0,a.execCommand)(`"${u.PYTHON_BIN}" --version`)).trim(),(0,r.log)(`[version] python \u7248\u672C: ${i}`)}catch(g){(0,r.log)(`[version] \u83B7\u53D6 python \u7248\u672C\u5931\u8D25: ${g.message}`),i=`error: ${g.message}`}(0,a.sendJSON)(e,200,{status:"\u6210\u529F",launcher:G.LAUNCHER_VERSION,node:n,qbotclaw:o,mcporter:s,python:i});return}if(f==="/api/port"){const n=exports.server.address(),o=n&&typeof n=="object"?n.port:null,s=(0,y.readState)();(0,a.sendJSON)(e,200,{status:"\u6210\u529F",launcher:o,qbotclaw:s.gatewayPort??2e3,mcpHttp:s.mcpHttpPort??u.DEFAULT_MCP_HTTP_PORT,mcpWs:s.mcpWsPort??8765});return}if(f==="/api/status"){const n=(0,y.readState)(),o=[];if(n.gatewayPid)try{process.kill(n.gatewayPid,0)}catch{o.push(`gateway \u8FDB\u7A0B (pid: ${n.gatewayPid}) \u5DF2\u9000\u51FA`)}else o.push("gateway \u8FDB\u7A0B\u672A\u542F\u52A8\uFF08\u72B6\u6001\u4E2D\u65E0 gatewayPid\uFF09");const s=[{name:"gateway",port:n.gatewayPort},{name:"mcpHttp",port:n.mcpHttpPort},{name:"mcpWs",port:n.mcpWsPort}];for(const{name:i,port:g}of s){if(!g){o.push(`${i} \u7AEF\u53E3\u672A\u914D\u7F6E\uFF08\u72B6\u6001\u4E2D\u65E0\u5BF9\u5E94\u7AEF\u53E3\u53F7\uFF09`);continue}await(0,y.isPortAvailable)(g)&&o.push(`${i} \u7AEF\u53E3 (${g}) \u65E0\u670D\u52A1\u76D1\u542C`)}o.length===0?(0,a.sendJSON)(e,200,{ok:!0,message:"\u6240\u6709\u670D\u52A1\u8FD0\u884C\u6B63\u5E38"}):(0,a.sendJSON)(e,200,{ok:!1,message:o.join("\uFF1B")});return}if(f==="/api/restart"){try{const n=(0,y.readState)();if(n.gatewayPid)try{process.kill(n.gatewayPid,"SIGTERM"),(0,r.log)(`[restart] \u5DF2\u53D1\u9001 SIGTERM \u7ED9\u65E7 gateway \u8FDB\u7A0B pid: ${n.gatewayPid}`)}catch{(0,r.log)(`[restart] \u65E7 gateway \u8FDB\u7A0B ${n.gatewayPid} \u53EF\u80FD\u5DF2\u9000\u51FA\uFF0C\u5FFD\u7565`)}const{gatewayPid:o,gatewayPort:s,mcpHttpPort:i,mcpWsPort:g,...m}=n;(0,y.writeState)(m),(0,r.log)("[restart] \u5DF2\u6E05\u9664 gatewayPid, gatewayPort, mcpHttpPort, mcpWsPort"),await(0,$.configAndRunQBotClaw)(),(0,r.log)("[restart] QBotClaw gateway \u91CD\u542F\u5B8C\u6210");const c=(0,y.readState)(),l=exports.server.address(),t=l&&typeof l=="object"?l.port:null;(0,a.sendJSON)(e,200,{ok:!0,message:"QBotClaw gateway \u91CD\u542F\u6210\u529F",launcher:t,qbotclaw:c.gatewayPort??2e3,mcpHttp:c.mcpHttpPort??u.DEFAULT_MCP_HTTP_PORT,mcpWs:c.mcpWsPort??8765,gatewayToken:(0,Q.getOrCreateGatewayToken)()})}catch(n){(0,r.log)(`[restart] \u91CD\u542F\u5931\u8D25: ${n.message}`),(0,a.sendJSON)(e,500,{ok:!1,message:`\u91CD\u542F\u5931\u8D25: ${n.message}`})}return}if(f==="/api/wechat/history"){try{if(!w.default.existsSync(u.SESSIONS_FILE)){(0,a.sendJSON)(e,404,{ok:!1,sessionKey:"",message:"\u672A\u627E\u5230\u4F1A\u8BDD\u6587\u4EF6"});return}const n=JSON.parse(w.default.readFileSync(u.SESSIONS_FILE,"utf-8"));let o=null,s=0;for(const[m,c]of Object.entries(n))if(m.includes("openclaw-weixin")){const t=c.updatedAt??0;t>s&&(s=t,o=m)}if(!o){(0,a.sendJSON)(e,404,{ok:!1,sessionKey:"",message:"\u672A\u627E\u5230\u5FAE\u4FE1\u4F1A\u8BDD"});return}const g=o.split(":").slice(2).join(":");(0,a.sendJSON)(e,200,{ok:!0,sessionKey:g,message:"\u83B7\u53D6\u6210\u529F"})}catch(n){(0,r.log)(`[wechat/history] \u8BFB\u53D6\u5FAE\u4FE1\u4F1A\u8BDD\u5931\u8D25: ${n.message}`),(0,a.sendJSON)(e,500,{ok:!1,sessionKey:"",message:`\u8BFB\u53D6\u5FAE\u4FE1\u4F1A\u8BDD\u5931\u8D25: ${n.message}`})}return}if(f==="/api/installing"){(0,a.sendJSON)(e,200,{installing:$.isInstalling});return}if(f==="/api/install"||f.startsWith("/api/install?")){if($.installState.status==="downloading"){(0,a.sendJSON)(e,200,{ok:"downloading",message:"\u6B63\u5728\u5B89\u88C5\u4E2D..."});return}const n=new URL(f,"http://localhost"),o=n.searchParams.get("version")||void 0,s=n.searchParams.get("overrideConfig")==="true";if(!o){(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:"\u7F3A\u5C11\u5FC5\u8981\u53C2\u6570 version\uFF0C\u7528\u6CD5: GET /api/install?version=x.x.x"});return}e.writeHead(200,{...C,"Content-Type":"text/plain; charset=utf-8","Transfer-Encoding":"chunked","Cache-Control":"no-cache"}),(0,$.runInstall)(e,o,s);return}if(f.startsWith("/api/watch")){const o=new URL(f,"http://localhost").searchParams.get("ppid");if(!o||isNaN(Number(o))){(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:"\u7F3A\u5C11\u6709\u6548\u7684 ppid \u53C2\u6570\uFF0C\u7528\u6CD5: GET /api/watch?ppid=12345"});return}const s=parseInt(o,10);try{process.kill(s,0)}catch{(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:`\u8FDB\u7A0B ${s} \u4E0D\u5B58\u5728`});return}const i=(0,y.readState)();(0,y.writeState)({...i,ppid:s}),W(s),(0,a.sendJSON)(e,200,{status:"\u6210\u529F",message:`\u5DF2\u5F00\u59CB\u76D1\u63A7\u7236\u8FDB\u7A0B ppid: ${s}`});return}if(f==="/api/qbotclaw"&&d.method==="POST"){let n="";d.on("data",o=>{n+=o.toString()}),d.on("end",()=>{let o;try{const s=JSON.parse(n);if(!Array.isArray(s.args)||s.args.length===0){(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:"\u53C2\u6570 args \u5FC5\u987B\u662F\u975E\u7A7A\u6570\u7EC4"});return}o=s.args.map(i=>String(i))}catch{(0,a.sendJSON)(e,400,{status:"\u5931\u8D25",message:"\u8BF7\u6C42\u4F53\u5FC5\u987B\u662F\u5408\u6CD5\u7684 JSON"});return}if(!w.default.existsSync(u.QBOTCLAW_BIN)){(0,a.sendJSON)(e,404,{status:"\u5931\u8D25",message:`qbotclaw \u53EF\u6267\u884C\u6587\u4EF6\u4E0D\u5B58\u5728: ${u.QBOTCLAW_BIN}`});return}e.writeHead(200,{...C,"Content-Type":"text/plain; charset=utf-8","Transfer-Encoding":"chunked","Cache-Control":"no-cache"}),(0,$.runQBotClaw)(o,e).then(()=>{e.end(`
2
2
  [\u6267\u884C\u6210\u529F]
3
3
  `)}).catch(s=>{e.end(`
4
4
  [\u542F\u52A8\u5931\u8D25: ${s.message}]
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LAUNCHER_VERSION=void 0,exports.LAUNCHER_VERSION="0.9.65";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LAUNCHER_VERSION=void 0,exports.LAUNCHER_VERSION="0.9.67";
@@ -1,28 +1,48 @@
1
1
  {
2
- "name": "is-extglob",
3
- "description": "Returns true if a string has an extglob.",
4
- "version": "2.1.1",
5
- "homepage": "https://github.com/jonschlinkert/is-extglob",
6
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
- "repository": "jonschlinkert/is-extglob",
8
- "bugs": {
9
- "url": "https://github.com/jonschlinkert/is-extglob/issues"
2
+ "_from": "is-extglob@^2.1.1",
3
+ "_id": "is-extglob@2.1.1",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
6
+ "_location": "/is-extglob",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "is-extglob@^2.1.1",
12
+ "name": "is-extglob",
13
+ "escapedName": "is-extglob",
14
+ "rawSpec": "^2.1.1",
15
+ "saveSpec": null,
16
+ "fetchSpec": "^2.1.1"
10
17
  },
11
- "license": "MIT",
12
- "files": [
13
- "index.js"
18
+ "_requiredBy": [
19
+ "/is-glob"
14
20
  ],
15
- "main": "index.js",
16
- "engines": {
17
- "node": ">=0.10.0"
21
+ "_resolved": "https://mirrors.tencent.com/npm/is-extglob/-/is-extglob-2.1.1.tgz",
22
+ "_shasum": "a88c02535791f02ed37c76a1b9ea9773c833f8c2",
23
+ "_spec": "is-extglob@^2.1.1",
24
+ "_where": "/Volumes/data/workspace/node_modules/is-glob",
25
+ "author": {
26
+ "name": "Jon Schlinkert",
27
+ "url": "https://github.com/jonschlinkert"
18
28
  },
19
- "scripts": {
20
- "test": "mocha"
29
+ "bugs": {
30
+ "url": "https://github.com/jonschlinkert/is-extglob/issues"
21
31
  },
32
+ "bundleDependencies": false,
33
+ "deprecated": false,
34
+ "description": "Returns true if a string has an extglob.",
22
35
  "devDependencies": {
23
36
  "gulp-format-md": "^0.1.10",
24
37
  "mocha": "^3.0.2"
25
38
  },
39
+ "engines": {
40
+ "node": ">=0.10.0"
41
+ },
42
+ "files": [
43
+ "index.js"
44
+ ],
45
+ "homepage": "https://github.com/jonschlinkert/is-extglob",
26
46
  "keywords": [
27
47
  "bash",
28
48
  "braces",
@@ -42,6 +62,16 @@
42
62
  "string",
43
63
  "test"
44
64
  ],
65
+ "license": "MIT",
66
+ "main": "index.js",
67
+ "name": "is-extglob",
68
+ "repository": {
69
+ "type": "git",
70
+ "url": "git+https://github.com/jonschlinkert/is-extglob.git"
71
+ },
72
+ "scripts": {
73
+ "test": "mocha"
74
+ },
45
75
  "verb": {
46
76
  "toc": false,
47
77
  "layout": "default",
@@ -65,5 +95,6 @@
65
95
  "lint": {
66
96
  "reflinks": true
67
97
  }
68
- }
98
+ },
99
+ "version": "2.1.1"
69
100
  }
@@ -1,36 +1,65 @@
1
1
  {
2
- "name": "is-glob",
3
- "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
4
- "version": "4.0.3",
5
- "homepage": "https://github.com/micromatch/is-glob",
6
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
- "contributors": [
8
- "Brian Woodward (https://twitter.com/doowb)",
9
- "Daniel Perez (https://tuvistavie.com)",
10
- "Jon Schlinkert (http://twitter.com/jonschlinkert)"
2
+ "_from": "is-glob@^4.0.3",
3
+ "_id": "is-glob@4.0.3",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
6
+ "_location": "/is-glob",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "is-glob@^4.0.3",
12
+ "name": "is-glob",
13
+ "escapedName": "is-glob",
14
+ "rawSpec": "^4.0.3",
15
+ "saveSpec": null,
16
+ "fetchSpec": "^4.0.3"
17
+ },
18
+ "_requiredBy": [
19
+ "/@parcel/watcher"
11
20
  ],
12
- "repository": "micromatch/is-glob",
21
+ "_resolved": "https://mirrors.tencent.com/npm/is-glob/-/is-glob-4.0.3.tgz",
22
+ "_shasum": "64f61e42cbbb2eec2071a9dac0b28ba1e65d5084",
23
+ "_spec": "is-glob@^4.0.3",
24
+ "_where": "/Volumes/data/workspace/parcel-watcher",
25
+ "author": {
26
+ "name": "Jon Schlinkert",
27
+ "url": "https://github.com/jonschlinkert"
28
+ },
13
29
  "bugs": {
14
30
  "url": "https://github.com/micromatch/is-glob/issues"
15
31
  },
16
- "license": "MIT",
17
- "files": [
18
- "index.js"
32
+ "bundleDependencies": false,
33
+ "contributors": [
34
+ {
35
+ "name": "Brian Woodward",
36
+ "url": "https://twitter.com/doowb"
37
+ },
38
+ {
39
+ "name": "Daniel Perez",
40
+ "url": "https://tuvistavie.com"
41
+ },
42
+ {
43
+ "name": "Jon Schlinkert",
44
+ "url": "http://twitter.com/jonschlinkert"
45
+ }
19
46
  ],
20
- "main": "index.js",
21
- "engines": {
22
- "node": ">=0.10.0"
23
- },
24
- "scripts": {
25
- "test": "mocha && node benchmark.js"
26
- },
27
47
  "dependencies": {
28
48
  "is-extglob": "^2.1.1"
29
49
  },
50
+ "deprecated": false,
51
+ "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
30
52
  "devDependencies": {
31
53
  "gulp-format-md": "^0.1.10",
32
54
  "mocha": "^3.0.2"
33
55
  },
56
+ "engines": {
57
+ "node": ">=0.10.0"
58
+ },
59
+ "files": [
60
+ "index.js"
61
+ ],
62
+ "homepage": "https://github.com/micromatch/is-glob",
34
63
  "keywords": [
35
64
  "bash",
36
65
  "braces",
@@ -50,6 +79,16 @@
50
79
  "string",
51
80
  "test"
52
81
  ],
82
+ "license": "MIT",
83
+ "main": "index.js",
84
+ "name": "is-glob",
85
+ "repository": {
86
+ "type": "git",
87
+ "url": "git+https://github.com/micromatch/is-glob.git"
88
+ },
89
+ "scripts": {
90
+ "test": "mocha && node benchmark.js"
91
+ },
53
92
  "verb": {
54
93
  "layout": "default",
55
94
  "plugins": [
@@ -77,5 +116,6 @@
77
116
  "verb",
78
117
  "vinyl"
79
118
  ]
80
- }
119
+ },
120
+ "version": "4.0.3"
81
121
  }
@@ -19,7 +19,7 @@ and exception handling semantics with low overhead.
19
19
  API references are available in the [doc](doc/README.md) directory.
20
20
 
21
21
  <!-- x-release-please-start-version -->
22
- ## Current version: 8.6.0
22
+ ## Current version: 8.7.0
23
23
  <!-- x-release-please-end -->
24
24
 
25
25
  (See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
@@ -1199,6 +1199,13 @@ inline Date Date::New(napi_env env, double val) {
1199
1199
  return Date(env, value);
1200
1200
  }
1201
1201
 
1202
+ inline Date Date::New(napi_env env, std::chrono::system_clock::time_point tp) {
1203
+ using namespace std::chrono;
1204
+ auto ms = static_cast<double>(
1205
+ duration_cast<milliseconds>(tp.time_since_epoch()).count());
1206
+ return Date::New(env, ms);
1207
+ }
1208
+
1202
1209
  inline void Date::CheckCast(napi_env env, napi_value value) {
1203
1210
  NAPI_CHECK(value != nullptr, "Date::CheckCast", "empty value");
1204
1211
 
@@ -1966,6 +1973,19 @@ inline MaybeOrValue<bool> Object::Seal() const {
1966
1973
  }
1967
1974
  #endif // NAPI_VERSION >= 8
1968
1975
 
1976
+ inline MaybeOrValue<Object> Object::GetPrototype() const {
1977
+ napi_value result;
1978
+ napi_status status = napi_get_prototype(_env, _value, &result);
1979
+ NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, Object(_env, result), Object);
1980
+ }
1981
+
1982
+ #ifdef NODE_API_EXPERIMENTAL_HAS_SET_PROTOTYPE
1983
+ inline MaybeOrValue<bool> Object::SetPrototype(const Object& value) const {
1984
+ napi_status status = node_api_set_prototype(_env, _value, value);
1985
+ NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool);
1986
+ }
1987
+ #endif
1988
+
1969
1989
  ////////////////////////////////////////////////////////////////////////////////
1970
1990
  // External class
1971
1991
  ////////////////////////////////////////////////////////////////////////////////
@@ -2289,6 +2309,39 @@ inline DataView DataView::New(napi_env env,
2289
2309
  return DataView(env, value);
2290
2310
  }
2291
2311
 
2312
+ #ifdef NODE_API_EXPERIMENTAL_HAS_SHAREDARRAYBUFFER
2313
+ inline DataView DataView::New(napi_env env,
2314
+ Napi::SharedArrayBuffer arrayBuffer) {
2315
+ return New(env, arrayBuffer, 0, arrayBuffer.ByteLength());
2316
+ }
2317
+
2318
+ inline DataView DataView::New(napi_env env,
2319
+ Napi::SharedArrayBuffer arrayBuffer,
2320
+ size_t byteOffset) {
2321
+ if (byteOffset > arrayBuffer.ByteLength()) {
2322
+ NAPI_THROW(RangeError::New(
2323
+ env, "Start offset is outside the bounds of the buffer"),
2324
+ DataView());
2325
+ }
2326
+ return New(
2327
+ env, arrayBuffer, byteOffset, arrayBuffer.ByteLength() - byteOffset);
2328
+ }
2329
+
2330
+ inline DataView DataView::New(napi_env env,
2331
+ Napi::SharedArrayBuffer arrayBuffer,
2332
+ size_t byteOffset,
2333
+ size_t byteLength) {
2334
+ if (byteOffset + byteLength > arrayBuffer.ByteLength()) {
2335
+ NAPI_THROW(RangeError::New(env, "Invalid DataView length"), DataView());
2336
+ }
2337
+ napi_value value;
2338
+ napi_status status =
2339
+ napi_create_dataview(env, byteLength, arrayBuffer, byteOffset, &value);
2340
+ NAPI_THROW_IF_FAILED(env, status, DataView());
2341
+ return DataView(env, value);
2342
+ }
2343
+ #endif // NODE_API_EXPERIMENTAL_HAS_SHAREDARRAYBUFFER
2344
+
2292
2345
  inline void DataView::CheckCast(napi_env env, napi_value value) {
2293
2346
  NAPI_CHECK(value != nullptr, "DataView::CheckCast", "empty value");
2294
2347
 
@@ -2312,6 +2365,10 @@ inline DataView::DataView(napi_env env, napi_value value) : Object(env, value) {
2312
2365
  }
2313
2366
 
2314
2367
  inline Napi::ArrayBuffer DataView::ArrayBuffer() const {
2368
+ return Buffer().As<Napi::ArrayBuffer>();
2369
+ }
2370
+
2371
+ inline Napi::Value DataView::Buffer() const {
2315
2372
  napi_value arrayBuffer;
2316
2373
  napi_status status = napi_get_dataview_info(_env,
2317
2374
  _value /* dataView */,
@@ -2319,8 +2376,8 @@ inline Napi::ArrayBuffer DataView::ArrayBuffer() const {
2319
2376
  nullptr /* data */,
2320
2377
  &arrayBuffer /* arrayBuffer */,
2321
2378
  nullptr /* byteOffset */);
2322
- NAPI_THROW_IF_FAILED(_env, status, Napi::ArrayBuffer());
2323
- return Napi::ArrayBuffer(_env, arrayBuffer);
2379
+ NAPI_THROW_IF_FAILED(_env, status, Napi::Value());
2380
+ return Napi::Value(_env, arrayBuffer);
2324
2381
  }
2325
2382
 
2326
2383
  inline size_t DataView::ByteOffset() const {
@@ -3809,8 +3866,8 @@ inline MaybeOrValue<bool> ObjectReference::Set(const std::string& utf8name,
3809
3866
  return Value().Set(utf8name, value);
3810
3867
  }
3811
3868
 
3812
- inline MaybeOrValue<bool> ObjectReference::Set(const std::string& utf8name,
3813
- std::string& utf8value) const {
3869
+ inline MaybeOrValue<bool> ObjectReference::Set(
3870
+ const std::string& utf8name, const std::string& utf8value) const {
3814
3871
  HandleScope scope(_env);
3815
3872
  return Value().Set(utf8name, utf8value);
3816
3873
  }
@@ -17,6 +17,7 @@
17
17
  #if NAPI_HAS_THREADS
18
18
  #include <mutex>
19
19
  #endif // NAPI_HAS_THREADS
20
+ #include <chrono>
20
21
  #include <string>
21
22
  #include <vector>
22
23
 
@@ -359,10 +360,10 @@ class BasicEnv {
359
360
  // ... occurs when comparing foo.Env() == bar.Env() or foo.Env() == nullptr
360
361
  bool operator==(const BasicEnv& other) const {
361
362
  return _env == other._env;
362
- };
363
+ }
363
364
  bool operator==(std::nullptr_t /*other*/) const {
364
365
  return _env == nullptr;
365
- };
366
+ }
366
367
 
367
368
  #if NAPI_VERSION > 2
368
369
  template <typename Hook, typename Arg = void>
@@ -685,6 +686,12 @@ class Date : public Value {
685
686
  double value ///< Number value
686
687
  );
687
688
 
689
+ /// Creates a new Date value from a std::chrono::system_clock::time_point.
690
+ static Date New(
691
+ napi_env env, ///< Node-API environment
692
+ std::chrono::system_clock::time_point time_point ///< Time point value
693
+ );
694
+
688
695
  static void CheckCast(napi_env env, napi_value value);
689
696
 
690
697
  Date(); ///< Creates a new _empty_ Date instance.
@@ -1118,6 +1125,12 @@ class Object : public TypeTaggable {
1118
1125
  /// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof
1119
1126
  MaybeOrValue<bool> Seal() const;
1120
1127
  #endif // NAPI_VERSION >= 8
1128
+
1129
+ MaybeOrValue<Object> GetPrototype() const;
1130
+
1131
+ #ifdef NODE_API_EXPERIMENTAL_HAS_SET_PROTOTYPE
1132
+ MaybeOrValue<bool> SetPrototype(const Object& value) const;
1133
+ #endif
1121
1134
  };
1122
1135
 
1123
1136
  template <typename T>
@@ -1450,13 +1463,37 @@ class DataView : public Object {
1450
1463
  size_t byteOffset,
1451
1464
  size_t byteLength);
1452
1465
 
1466
+ #ifdef NODE_API_EXPERIMENTAL_HAS_SHAREDARRAYBUFFER
1467
+ static DataView New(napi_env env, Napi::SharedArrayBuffer arrayBuffer);
1468
+ static DataView New(napi_env env,
1469
+ Napi::SharedArrayBuffer arrayBuffer,
1470
+ size_t byteOffset);
1471
+ static DataView New(napi_env env,
1472
+ Napi::SharedArrayBuffer arrayBuffer,
1473
+ size_t byteOffset,
1474
+ size_t byteLength);
1475
+ #endif
1476
+
1453
1477
  static void CheckCast(napi_env env, napi_value value);
1454
1478
 
1455
1479
  DataView(); ///< Creates a new _empty_ DataView instance.
1456
1480
  DataView(napi_env env,
1457
1481
  napi_value value); ///< Wraps a Node-API value primitive.
1458
1482
 
1459
- Napi::ArrayBuffer ArrayBuffer() const; ///< Gets the backing array buffer.
1483
+ // Gets the backing `ArrayBuffer`.
1484
+ //
1485
+ // If this `DataView` is not backed by an `ArrayBuffer`, this method will
1486
+ // terminate the process with a fatal error when using
1487
+ // `NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS` or exhibit undefined behavior
1488
+ // otherwise. Use `Buffer()` instead to get the backing buffer without
1489
+ // assuming its type.
1490
+ Napi::ArrayBuffer ArrayBuffer() const;
1491
+
1492
+ // Gets the backing buffer (an `ArrayBuffer` or `SharedArrayBuffer`).
1493
+ //
1494
+ // Use `IsArrayBuffer()` or `IsSharedArrayBuffer()` to check the type of the
1495
+ // backing buffer prior to casting with `As<T>()`.
1496
+ Napi::Value Buffer() const;
1460
1497
  size_t ByteOffset()
1461
1498
  const; ///< Gets the offset into the buffer where the array starts.
1462
1499
  size_t ByteLength() const; ///< Gets the length of the array in bytes.
@@ -1733,7 +1770,7 @@ class ObjectReference : public Reference<Object> {
1733
1770
  MaybeOrValue<bool> Set(const std::string& utf8name, napi_value value) const;
1734
1771
  MaybeOrValue<bool> Set(const std::string& utf8name, Napi::Value value) const;
1735
1772
  MaybeOrValue<bool> Set(const std::string& utf8name,
1736
- std::string& utf8value) const;
1773
+ const std::string& utf8value) const;
1737
1774
  MaybeOrValue<bool> Set(const std::string& utf8name, bool boolValue) const;
1738
1775
  MaybeOrValue<bool> Set(const std::string& utf8name, double numberValue) const;
1739
1776
 
@@ -3126,8 +3163,8 @@ class AsyncProgressWorkerBase : public AsyncWorker {
3126
3163
 
3127
3164
  AsyncProgressWorkerBase* asyncprogressworker() {
3128
3165
  return _asyncprogressworker;
3129
- };
3130
- DataType* data() { return _data; };
3166
+ }
3167
+ DataType* data() { return _data; }
3131
3168
 
3132
3169
  private:
3133
3170
  AsyncProgressWorkerBase* _asyncprogressworker;
@@ -1,7 +1,31 @@
1
1
  {
2
+ "_from": "node-addon-api@^8.6.0",
3
+ "_id": "node-addon-api@8.7.0",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-9MdFxmkKaOYVTV+XVRG8ArDwwQ77XIgIPyKASB1k3JPq3M8fGQQQE3YpMOrKm6g//Ktx8ivZr8xo1Qmtqub+GA==",
6
+ "_location": "/node-addon-api",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "node-addon-api@^8.6.0",
12
+ "name": "node-addon-api",
13
+ "escapedName": "node-addon-api",
14
+ "rawSpec": "^8.6.0",
15
+ "saveSpec": null,
16
+ "fetchSpec": "^8.6.0"
17
+ },
18
+ "_requiredBy": [
19
+ "/@parcel/watcher"
20
+ ],
21
+ "_resolved": "https://mirrors.tencent.com/npm/node-addon-api/-/node-addon-api-8.7.0.tgz",
22
+ "_shasum": "f64f8413456ecbe900221305a3f883c37666473f",
23
+ "_spec": "node-addon-api@^8.6.0",
24
+ "_where": "/Volumes/data/workspace/parcel-watcher",
2
25
  "bugs": {
3
26
  "url": "https://github.com/nodejs/node-addon-api/issues"
4
27
  },
28
+ "bundleDependencies": false,
5
29
  "contributors": [
6
30
  {
7
31
  "name": "Abhishek Kumar Singh",
@@ -416,6 +440,7 @@
416
440
  "url": "https://github.com/tuhalf"
417
441
  }
418
442
  ],
443
+ "deprecated": false,
419
444
  "description": "Node.js API (Node-API)",
420
445
  "devDependencies": {
421
446
  "benchmark": "^2.1.4",
@@ -428,6 +453,14 @@
428
453
  "semver": "^7.6.0"
429
454
  },
430
455
  "directories": {},
456
+ "engines": {
457
+ "node": "^18 || ^20 || >= 21"
458
+ },
459
+ "files": [
460
+ "*.{c,h,gyp,gypi}",
461
+ "package-support.json",
462
+ "tools/"
463
+ ],
431
464
  "gypfile": false,
432
465
  "homepage": "https://github.com/nodejs/node-addon-api",
433
466
  "keywords": [
@@ -444,37 +477,28 @@
444
477
  "license": "MIT",
445
478
  "main": "index.js",
446
479
  "name": "node-addon-api",
447
- "readme": "README.md",
480
+ "pre-commit": "lint",
448
481
  "repository": {
449
482
  "type": "git",
450
483
  "url": "git://github.com/nodejs/node-addon-api.git"
451
484
  },
452
- "files": [
453
- "*.{c,h,gyp,gypi}",
454
- "package-support.json",
455
- "tools/"
456
- ],
457
485
  "scripts": {
458
- "prebenchmark": "node-gyp rebuild -C benchmark",
459
486
  "benchmark": "node benchmark",
460
487
  "create-coverage": "npm test --coverage",
461
- "report-coverage-html": "rm -rf coverage-html && mkdir coverage-html && gcovr -e test --merge-mode-functions merge-use-line-max --html-nested ./coverage-html/index.html test",
462
- "report-coverage-xml": "rm -rf coverage-xml && mkdir coverage-xml && gcovr -e test --merge-mode-functions merge-use-line-max --xml -o ./coverage-xml/coverage-cxx.xml test",
463
- "pretest": "node-gyp rebuild -C test",
464
- "test": "node test",
465
- "test:debug": "node-gyp rebuild -C test --debug && NODE_API_BUILD_CONFIG=Debug node ./test/index.js",
466
- "predev": "node-gyp rebuild -C test --debug",
467
488
  "dev": "node test",
468
- "predev:incremental": "node-gyp configure build -C test --debug",
469
489
  "dev:incremental": "node test",
470
490
  "doc": "doxygen doc/Doxyfile",
471
491
  "lint": "eslint && node tools/clang-format",
472
- "lint:fix": "eslint --fix && node tools/clang-format --fix"
492
+ "lint:fix": "eslint --fix && node tools/clang-format --fix",
493
+ "prebenchmark": "node-gyp rebuild -C benchmark",
494
+ "predev": "node-gyp rebuild -C test --debug",
495
+ "predev:incremental": "node-gyp configure build -C test --debug",
496
+ "pretest": "node-gyp rebuild -C test",
497
+ "report-coverage-html": "rm -rf coverage-html && mkdir coverage-html && gcovr -e test --merge-mode-functions merge-use-line-max --html-nested ./coverage-html/index.html test",
498
+ "report-coverage-xml": "rm -rf coverage-xml && mkdir coverage-xml && gcovr -e test --merge-mode-functions merge-use-line-max --xml -o ./coverage-xml/coverage-cxx.xml test",
499
+ "test": "node test",
500
+ "test:debug": "node-gyp rebuild -C test --debug && NODE_API_BUILD_CONFIG=Debug node ./test/index.js"
473
501
  },
474
- "pre-commit": "lint",
475
- "version": "8.6.0",
476
502
  "support": true,
477
- "engines": {
478
- "node": "^18 || ^20 || >= 21"
479
- }
503
+ "version": "8.7.0"
480
504
  }
@@ -265,6 +265,17 @@ Compile a regular expression from the `state` object returned by the
265
265
  * `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
266
266
  * `returns` **{RegExp}**
267
267
 
268
+ **Example**
269
+
270
+ ```js
271
+ const picomatch = require('picomatch');
272
+ const state = picomatch.parse('*.js');
273
+ // picomatch.compileRe(state[, options]);
274
+
275
+ console.log(picomatch.compileRe(state));
276
+ //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
277
+ ```
278
+
268
279
  ### [.makeRe](lib/picomatch.js#L285)
269
280
 
270
281
  Create a regular expression from a parsed glob pattern.
@@ -281,10 +292,10 @@ Create a regular expression from a parsed glob pattern.
281
292
 
282
293
  ```js
283
294
  const picomatch = require('picomatch');
284
- const state = picomatch.parse('*.js');
285
- // picomatch.compileRe(state[, options]);
295
+ // picomatch.makeRe(state[, options]);
286
296
 
287
- console.log(picomatch.compileRe(state));
297
+ const result = picomatch.makeRe('*.js');
298
+ console.log(result);
288
299
  //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
289
300
  ```
290
301
 
@@ -323,11 +334,9 @@ The following options may be used with the main `picomatch()` function or any of
323
334
  | `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
324
335
  | `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
325
336
  | `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
326
- | `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
327
337
  | `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
328
338
  | `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
329
339
  | `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
330
- | `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. |
331
340
  | `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
332
341
  | `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
333
342
  | [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
@@ -336,26 +345,23 @@ The following options may be used with the main `picomatch()` function or any of
336
345
  | `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
337
346
  | `matchBase` | `boolean` | `false` | Alias for `basename` |
338
347
  | `maxLength` | `number` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
348
+ | `maxExtglobRecursion` | `number\|boolean` | `0` | Limit nested quantified extglobs and other risky repeated extglob forms. When the limit is exceeded, the extglob is treated as a literal string instead of being compiled to regex. Set to `false` to disable this safeguard. |
339
349
  | `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
340
350
  | `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
341
351
  | `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
342
- | `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
343
352
  | `noext` | `boolean` | `false` | Alias for `noextglob` |
344
353
  | `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) |
345
354
  | `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
346
355
  | `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
347
- | `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
348
356
  | [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
349
357
  | [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
350
358
  | [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
351
359
  | `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). |
352
- | `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
353
360
  | `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
354
361
  | `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
355
362
  | `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
356
363
  | `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
357
364
  | `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
358
- | `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
359
365
  | `windows` | `boolean` | `false` | Also accept backslashes as the path separator. |
360
366
 
361
367
  ### Scan Options
@@ -549,6 +555,13 @@ console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false
549
555
 
550
556
  // supports nested extglobs
551
557
  console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true
558
+
559
+ // risky quantified extglobs are treated literally by default
560
+ console.log(pm.makeRe('+(a|aa)'));
561
+ //=> /^(?:\+\(a\|aa\))$/
562
+
563
+ // increase the limit to allow a small amount of nested quantified extglobs
564
+ console.log(pm.isMatch('aaa', '+(+(a))', { maxExtglobRecursion: 1 })); // true
552
565
  ```
553
566
 
554
567
  #### POSIX brackets
@@ -585,7 +598,7 @@ See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_no
585
598
 
586
599
  ### Braces
587
600
 
588
- Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces.
601
+ Picomatch only does [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) of comma-delimited lists (e.g. `a/{b,c}/d`). For advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch), which supports advanced syntax such as ranges (e.g. `{01..03}`) and increments (e.g. `{2..10..2}`).
589
602
 
590
603
  ### Matching special characters as literals
591
604
 
@@ -629,44 +642,42 @@ The following table shows which features are supported by [minimatch](https://gi
629
642
 
630
643
  Performance comparison of picomatch and minimatch.
631
644
 
632
- _(Pay special attention to the last three benchmarks. Minimatch freezes on long ranges.)_
633
-
634
645
  ```
635
646
  # .makeRe star (*)
636
- picomatch x 4,449,159 ops/sec ±0.24% (97 runs sampled)
637
- minimatch x 632,772 ops/sec ±0.14% (98 runs sampled)
647
+ picomatch x 3,251,247 ops/sec ±0.25% (95 runs sampled)
648
+ minimatch x 497,224 ops/sec ±0.11% (100 runs sampled)
638
649
 
639
650
  # .makeRe star; dot=true (*)
640
- picomatch x 3,500,079 ops/sec ±0.26% (99 runs sampled)
641
- minimatch x 564,916 ops/sec ±0.23% (96 runs sampled)
651
+ picomatch x 2,624,035 ops/sec ±0.16% (98 runs sampled)
652
+ minimatch x 446,244 ops/sec ±0.63% (99 runs sampled)
642
653
 
643
654
  # .makeRe globstar (**)
644
- picomatch x 3,261,000 ops/sec ±0.27% (98 runs sampled)
645
- minimatch x 1,664,766 ops/sec ±0.20% (100 runs sampled)
655
+ picomatch x 2,524,465 ops/sec ±0.13% (99 runs sampled)
656
+ minimatch x 1,396,257 ops/sec ±0.58% (96 runs sampled)
646
657
 
647
658
  # .makeRe globstars (**/**/**)
648
- picomatch x 3,284,469 ops/sec ±0.18% (97 runs sampled)
649
- minimatch x 1,435,880 ops/sec ±0.34% (95 runs sampled)
659
+ picomatch x 2,545,674 ops/sec ±0.10% (99 runs sampled)
660
+ minimatch x 1,196,835 ops/sec ±0.63% (98 runs sampled)
650
661
 
651
662
  # .makeRe with leading star (*.txt)
652
- picomatch x 3,100,197 ops/sec ±0.35% (99 runs sampled)
653
- minimatch x 428,347 ops/sec ±0.42% (94 runs sampled)
663
+ picomatch x 2,537,708 ops/sec ±0.11% (100 runs sampled)
664
+ minimatch x 345,284 ops/sec ±0.64% (96 runs sampled)
654
665
 
655
666
  # .makeRe - basic braces ({a,b,c}*.txt)
656
- picomatch x 443,578 ops/sec ±1.33% (89 runs sampled)
657
- minimatch x 107,143 ops/sec ±0.35% (94 runs sampled)
667
+ picomatch x 505,430 ops/sec ±1.04% (94 runs sampled)
668
+ minimatch x 107,991 ops/sec ±0.54% (99 runs sampled)
658
669
 
659
670
  # .makeRe - short ranges ({a..z}*.txt)
660
- picomatch x 415,484 ops/sec ±0.76% (96 runs sampled)
661
- minimatch x 14,299 ops/sec ±0.26% (96 runs sampled)
671
+ picomatch x 371,179 ops/sec ±2.91% (77 runs sampled)
672
+ minimatch x 14,104 ops/sec ±0.61% (99 runs sampled)
662
673
 
663
674
  # .makeRe - medium ranges ({1..100000}*.txt)
664
- picomatch x 395,020 ops/sec ±0.87% (89 runs sampled)
665
- minimatch x 2 ops/sec ±4.59% (10 runs sampled)
675
+ picomatch x 384,958 ops/sec ±1.70% (82 runs sampled)
676
+ minimatch x 2.55 ops/sec ±3.22% (11 runs sampled)
666
677
 
667
678
  # .makeRe - long ranges ({1..10000000}*.txt)
668
- picomatch x 400,036 ops/sec ±0.83% (90 runs sampled)
669
- minimatch (FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory)
679
+ picomatch x 382,552 ops/sec ±1.52% (71 runs sampled)
680
+ minimatch x 0.83 ops/sec ±5.67% (7 runs sampled))
670
681
  ```
671
682
 
672
683
  <br>
@@ -3,6 +3,8 @@
3
3
  const WIN_SLASH = '\\\\/';
4
4
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
5
5
 
6
+ const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
7
+
6
8
  /**
7
9
  * Posix glob regex
8
10
  */
@@ -69,6 +71,7 @@ const WINDOWS_CHARS = {
69
71
  */
70
72
 
71
73
  const POSIX_REGEX_SOURCE = {
74
+ __proto__: null,
72
75
  alnum: 'a-zA-Z0-9',
73
76
  alpha: 'a-zA-Z',
74
77
  ascii: '\\x00-\\x7F',
@@ -86,6 +89,7 @@ const POSIX_REGEX_SOURCE = {
86
89
  };
87
90
 
88
91
  module.exports = {
92
+ DEFAULT_MAX_EXTGLOB_RECURSION,
89
93
  MAX_LENGTH: 1024 * 64,
90
94
  POSIX_REGEX_SOURCE,
91
95
 
@@ -45,6 +45,277 @@ const syntaxError = (type, char) => {
45
45
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
46
46
  };
47
47
 
48
+ const splitTopLevel = input => {
49
+ const parts = [];
50
+ let bracket = 0;
51
+ let paren = 0;
52
+ let quote = 0;
53
+ let value = '';
54
+ let escaped = false;
55
+
56
+ for (const ch of input) {
57
+ if (escaped === true) {
58
+ value += ch;
59
+ escaped = false;
60
+ continue;
61
+ }
62
+
63
+ if (ch === '\\') {
64
+ value += ch;
65
+ escaped = true;
66
+ continue;
67
+ }
68
+
69
+ if (ch === '"') {
70
+ quote = quote === 1 ? 0 : 1;
71
+ value += ch;
72
+ continue;
73
+ }
74
+
75
+ if (quote === 0) {
76
+ if (ch === '[') {
77
+ bracket++;
78
+ } else if (ch === ']' && bracket > 0) {
79
+ bracket--;
80
+ } else if (bracket === 0) {
81
+ if (ch === '(') {
82
+ paren++;
83
+ } else if (ch === ')' && paren > 0) {
84
+ paren--;
85
+ } else if (ch === '|' && paren === 0) {
86
+ parts.push(value);
87
+ value = '';
88
+ continue;
89
+ }
90
+ }
91
+ }
92
+
93
+ value += ch;
94
+ }
95
+
96
+ parts.push(value);
97
+ return parts;
98
+ };
99
+
100
+ const isPlainBranch = branch => {
101
+ let escaped = false;
102
+
103
+ for (const ch of branch) {
104
+ if (escaped === true) {
105
+ escaped = false;
106
+ continue;
107
+ }
108
+
109
+ if (ch === '\\') {
110
+ escaped = true;
111
+ continue;
112
+ }
113
+
114
+ if (/[?*+@!()[\]{}]/.test(ch)) {
115
+ return false;
116
+ }
117
+ }
118
+
119
+ return true;
120
+ };
121
+
122
+ const normalizeSimpleBranch = branch => {
123
+ let value = branch.trim();
124
+ let changed = true;
125
+
126
+ while (changed === true) {
127
+ changed = false;
128
+
129
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
130
+ value = value.slice(2, -1);
131
+ changed = true;
132
+ }
133
+ }
134
+
135
+ if (!isPlainBranch(value)) {
136
+ return;
137
+ }
138
+
139
+ return value.replace(/\\(.)/g, '$1');
140
+ };
141
+
142
+ const hasRepeatedCharPrefixOverlap = branches => {
143
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
144
+
145
+ for (let i = 0; i < values.length; i++) {
146
+ for (let j = i + 1; j < values.length; j++) {
147
+ const a = values[i];
148
+ const b = values[j];
149
+ const char = a[0];
150
+
151
+ if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
152
+ continue;
153
+ }
154
+
155
+ if (a === b || a.startsWith(b) || b.startsWith(a)) {
156
+ return true;
157
+ }
158
+ }
159
+ }
160
+
161
+ return false;
162
+ };
163
+
164
+ const parseRepeatedExtglob = (pattern, requireEnd = true) => {
165
+ if ((pattern[0] !== '+' && pattern[0] !== '*') || pattern[1] !== '(') {
166
+ return;
167
+ }
168
+
169
+ let bracket = 0;
170
+ let paren = 0;
171
+ let quote = 0;
172
+ let escaped = false;
173
+
174
+ for (let i = 1; i < pattern.length; i++) {
175
+ const ch = pattern[i];
176
+
177
+ if (escaped === true) {
178
+ escaped = false;
179
+ continue;
180
+ }
181
+
182
+ if (ch === '\\') {
183
+ escaped = true;
184
+ continue;
185
+ }
186
+
187
+ if (ch === '"') {
188
+ quote = quote === 1 ? 0 : 1;
189
+ continue;
190
+ }
191
+
192
+ if (quote === 1) {
193
+ continue;
194
+ }
195
+
196
+ if (ch === '[') {
197
+ bracket++;
198
+ continue;
199
+ }
200
+
201
+ if (ch === ']' && bracket > 0) {
202
+ bracket--;
203
+ continue;
204
+ }
205
+
206
+ if (bracket > 0) {
207
+ continue;
208
+ }
209
+
210
+ if (ch === '(') {
211
+ paren++;
212
+ continue;
213
+ }
214
+
215
+ if (ch === ')') {
216
+ paren--;
217
+
218
+ if (paren === 0) {
219
+ if (requireEnd === true && i !== pattern.length - 1) {
220
+ return;
221
+ }
222
+
223
+ return {
224
+ type: pattern[0],
225
+ body: pattern.slice(2, i),
226
+ end: i
227
+ };
228
+ }
229
+ }
230
+ }
231
+ };
232
+
233
+ const getStarExtglobSequenceOutput = pattern => {
234
+ let index = 0;
235
+ const chars = [];
236
+
237
+ while (index < pattern.length) {
238
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
239
+
240
+ if (!match || match.type !== '*') {
241
+ return;
242
+ }
243
+
244
+ const branches = splitTopLevel(match.body).map(branch => branch.trim());
245
+ if (branches.length !== 1) {
246
+ return;
247
+ }
248
+
249
+ const branch = normalizeSimpleBranch(branches[0]);
250
+ if (!branch || branch.length !== 1) {
251
+ return;
252
+ }
253
+
254
+ chars.push(branch);
255
+ index += match.end + 1;
256
+ }
257
+
258
+ if (chars.length < 1) {
259
+ return;
260
+ }
261
+
262
+ const source = chars.length === 1
263
+ ? utils.escapeRegex(chars[0])
264
+ : `[${chars.map(ch => utils.escapeRegex(ch)).join('')}]`;
265
+
266
+ return `${source}*`;
267
+ };
268
+
269
+ const repeatedExtglobRecursion = pattern => {
270
+ let depth = 0;
271
+ let value = pattern.trim();
272
+ let match = parseRepeatedExtglob(value);
273
+
274
+ while (match) {
275
+ depth++;
276
+ value = match.body.trim();
277
+ match = parseRepeatedExtglob(value);
278
+ }
279
+
280
+ return depth;
281
+ };
282
+
283
+ const analyzeRepeatedExtglob = (body, options) => {
284
+ if (options.maxExtglobRecursion === false) {
285
+ return { risky: false };
286
+ }
287
+
288
+ const max =
289
+ typeof options.maxExtglobRecursion === 'number'
290
+ ? options.maxExtglobRecursion
291
+ : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
292
+
293
+ const branches = splitTopLevel(body).map(branch => branch.trim());
294
+
295
+ if (branches.length > 1) {
296
+ if (
297
+ branches.some(branch => branch === '') ||
298
+ branches.some(branch => /^[*?]+$/.test(branch)) ||
299
+ hasRepeatedCharPrefixOverlap(branches)
300
+ ) {
301
+ return { risky: true };
302
+ }
303
+ }
304
+
305
+ for (const branch of branches) {
306
+ const safeOutput = getStarExtglobSequenceOutput(branch);
307
+ if (safeOutput) {
308
+ return { risky: true, safeOutput };
309
+ }
310
+
311
+ if (repeatedExtglobRecursion(branch) > max) {
312
+ return { risky: true };
313
+ }
314
+ }
315
+
316
+ return { risky: false };
317
+ };
318
+
48
319
  /**
49
320
  * Parse the given input string.
50
321
  * @param {String} input
@@ -225,6 +496,8 @@ const parse = (input, options) => {
225
496
  token.prev = prev;
226
497
  token.parens = state.parens;
227
498
  token.output = state.output;
499
+ token.startIndex = state.index;
500
+ token.tokensIndex = tokens.length;
228
501
  const output = (opts.capture ? '(' : '') + token.open;
229
502
 
230
503
  increment('parens');
@@ -234,6 +507,34 @@ const parse = (input, options) => {
234
507
  };
235
508
 
236
509
  const extglobClose = token => {
510
+ const literal = input.slice(token.startIndex, state.index + 1);
511
+ const body = input.slice(token.startIndex + 2, state.index);
512
+ const analysis = analyzeRepeatedExtglob(body, opts);
513
+
514
+ if ((token.type === 'plus' || token.type === 'star') && analysis.risky) {
515
+ const safeOutput = analysis.safeOutput
516
+ ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput)
517
+ : undefined;
518
+ const open = tokens[token.tokensIndex];
519
+
520
+ open.type = 'text';
521
+ open.value = literal;
522
+ open.output = safeOutput || utils.escapeRegex(literal);
523
+
524
+ for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
525
+ tokens[i].value = '';
526
+ tokens[i].output = '';
527
+ delete tokens[i].suffix;
528
+ }
529
+
530
+ state.output = token.output + open.output;
531
+ state.backtrack = true;
532
+
533
+ push({ type: 'paren', extglob: true, value, output: '' });
534
+ decrement('parens');
535
+ return;
536
+ }
537
+
237
538
  let output = token.close + (opts.capture ? ')' : '');
238
539
  let rest;
239
540
 
@@ -233,6 +233,14 @@ picomatch.scan = (input, options) => scan(input, options);
233
233
  * Compile a regular expression from the `state` object returned by the
234
234
  * [parse()](#parse) method.
235
235
  *
236
+ * ```js
237
+ * const picomatch = require('picomatch');
238
+ * const state = picomatch.parse('*.js');
239
+ * // picomatch.compileRe(state[, options]);
240
+ *
241
+ * console.log(picomatch.compileRe(state));
242
+ * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
243
+ * ```
236
244
  * @param {Object} `state`
237
245
  * @param {Object} `options`
238
246
  * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
@@ -268,10 +276,10 @@ picomatch.compileRe = (state, options, returnOutput = false, returnState = false
268
276
  *
269
277
  * ```js
270
278
  * const picomatch = require('picomatch');
271
- * const state = picomatch.parse('*.js');
272
- * // picomatch.compileRe(state[, options]);
279
+ * // picomatch.makeRe(state[, options]);
273
280
  *
274
- * console.log(picomatch.compileRe(state));
281
+ * const result = picomatch.makeRe('*.js');
282
+ * console.log(result);
275
283
  * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
276
284
  * ```
277
285
  * @param {String} `state` The object returned from the `.parse` method.
@@ -1,45 +1,62 @@
1
1
  {
2
- "name": "picomatch",
3
- "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.",
4
- "version": "4.0.3",
5
- "homepage": "https://github.com/micromatch/picomatch",
6
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
- "funding": "https://github.com/sponsors/jonschlinkert",
8
- "repository": "micromatch/picomatch",
9
- "bugs": {
10
- "url": "https://github.com/micromatch/picomatch/issues"
2
+ "_from": "picomatch@^4.0.3",
3
+ "_id": "picomatch@4.0.4",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
6
+ "_location": "/picomatch",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "picomatch@^4.0.3",
12
+ "name": "picomatch",
13
+ "escapedName": "picomatch",
14
+ "rawSpec": "^4.0.3",
15
+ "saveSpec": null,
16
+ "fetchSpec": "^4.0.3"
11
17
  },
12
- "license": "MIT",
13
- "files": [
14
- "index.js",
15
- "posix.js",
16
- "lib"
18
+ "_requiredBy": [
19
+ "/@parcel/watcher"
17
20
  ],
18
- "sideEffects": false,
19
- "main": "index.js",
20
- "engines": {
21
- "node": ">=12"
21
+ "_resolved": "https://mirrors.tencent.com/npm/picomatch/-/picomatch-4.0.4.tgz",
22
+ "_shasum": "fd6f5e00a143086e074dffe4c924b8fb293b0589",
23
+ "_spec": "picomatch@^4.0.3",
24
+ "_where": "/Volumes/data/workspace/parcel-watcher",
25
+ "author": {
26
+ "name": "Jon Schlinkert",
27
+ "url": "https://github.com/jonschlinkert"
22
28
  },
23
- "scripts": {
24
- "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
25
- "mocha": "mocha --reporter dot",
26
- "test": "npm run lint && npm run mocha",
27
- "test:ci": "npm run test:cover",
28
- "test:cover": "nyc npm run mocha"
29
+ "bugs": {
30
+ "url": "https://github.com/micromatch/picomatch/issues"
29
31
  },
32
+ "bundleDependencies": false,
33
+ "deprecated": false,
34
+ "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.",
30
35
  "devDependencies": {
31
36
  "eslint": "^8.57.0",
32
37
  "fill-range": "^7.0.1",
33
38
  "gulp-format-md": "^2.0.0",
34
39
  "mocha": "^10.4.0",
35
- "nyc": "^15.1.0",
36
- "time-require": "github:jonschlinkert/time-require"
40
+ "nyc": "^15.1.0"
37
41
  },
42
+ "engines": {
43
+ "node": ">=12"
44
+ },
45
+ "files": [
46
+ "index.js",
47
+ "posix.js",
48
+ "lib"
49
+ ],
50
+ "funding": "https://github.com/sponsors/jonschlinkert",
51
+ "homepage": "https://github.com/micromatch/picomatch",
38
52
  "keywords": [
39
53
  "glob",
40
54
  "match",
41
55
  "picomatch"
42
56
  ],
57
+ "license": "MIT",
58
+ "main": "index.js",
59
+ "name": "picomatch",
43
60
  "nyc": {
44
61
  "reporter": [
45
62
  "html",
@@ -47,6 +64,18 @@
47
64
  "text-summary"
48
65
  ]
49
66
  },
67
+ "repository": {
68
+ "type": "git",
69
+ "url": "git+https://github.com/micromatch/picomatch.git"
70
+ },
71
+ "scripts": {
72
+ "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
73
+ "mocha": "mocha --reporter dot",
74
+ "test": "npm run lint && npm run mocha",
75
+ "test:ci": "npm run test:cover",
76
+ "test:cover": "nyc npm run mocha"
77
+ },
78
+ "sideEffects": false,
50
79
  "verb": {
51
80
  "toc": {
52
81
  "render": true,
@@ -79,5 +108,6 @@
79
108
  "nanomatch",
80
109
  "picomatch"
81
110
  ]
82
- }
111
+ },
112
+ "version": "4.0.4"
83
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qqbrowser/qbot-claw-launcher",
3
- "version": "0.9.65",
3
+ "version": "0.9.67",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {