@nocobase/plugin-logger 2.1.0-beta.2 → 2.1.0-beta.21
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/LICENSE +201 -661
- package/README.md +79 -10
- package/dist/client/748.6ffc402a5c68f16d.js +10 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +5 -5
- package/dist/node_modules/tar-fs/index.js +1 -1
- package/dist/node_modules/tar-fs/package.json +1 -1
- package/package.json +3 -3
- package/dist/client/cadb8b365e6b852a.js +0 -10
package/README.md
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
# NocoBase
|
|
2
2
|
|
|
3
3
|
<video width="100%" controls>
|
|
4
|
-
|
|
4
|
+
<source src="https://github.com/user-attachments/assets/4d11a87b-00e2-48f3-9bf7-389d21072d13" type="video/mp4">
|
|
5
5
|
</video>
|
|
6
6
|
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://trendshift.io/repositories/4112" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4112" alt="nocobase%2Fnocobase | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
|
9
|
+
<a href="https://www.producthunt.com/posts/nocobase?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_souce=badge-nocobase" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=456520&theme=light&period=weekly&topic_id=267" alt="NocoBase - Scalability-first, open-source no-code platform | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
|
10
|
+
</p>
|
|
7
11
|
|
|
8
12
|
## What is NocoBase
|
|
9
13
|
|
|
10
|
-
NocoBase is
|
|
11
|
-
|
|
14
|
+
NocoBase is the most extensible AI-powered no-code platform.
|
|
15
|
+
Total control. Infinite extensibility. AI collaboration.
|
|
16
|
+
Enable your team to adapt quickly and cut costs dramatically.
|
|
17
|
+
No years of development. No millions wasted.
|
|
18
|
+
Deploy NocoBase in minutes — and take control of everything.
|
|
12
19
|
|
|
13
20
|
Homepage:
|
|
14
|
-
https://www.nocobase.com/
|
|
21
|
+
https://www.nocobase.com/
|
|
15
22
|
|
|
16
23
|
Online Demo:
|
|
17
24
|
https://demo.nocobase.com/new
|
|
@@ -19,12 +26,74 @@ https://demo.nocobase.com/new
|
|
|
19
26
|
Documents:
|
|
20
27
|
https://docs.nocobase.com/
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
https://
|
|
29
|
+
Forum:
|
|
30
|
+
https://forum.nocobase.com/
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
https://www.nocobase.com/en/
|
|
32
|
+
Use Cases:
|
|
33
|
+
https://www.nocobase.com/en/blog/tags/customer-stories
|
|
27
34
|
|
|
35
|
+
## Release Notes
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
Our [blog](https://www.nocobase.com/en/blog/timeline) is regularly updated with release notes and provides a weekly summary.
|
|
38
|
+
|
|
39
|
+
## Distinctive features
|
|
40
|
+
|
|
41
|
+
### 1. Data model-driven, not form/table–driven
|
|
42
|
+
|
|
43
|
+
Instead of being constrained by forms or tables, NocoBase adopts a data model–driven approach, separating data structure from user interface to unlock unlimited possibilities.
|
|
44
|
+
|
|
45
|
+
- UI and data structure are fully decoupled
|
|
46
|
+
- Multiple blocks and actions can be created for the same table or record in any quantity or form
|
|
47
|
+
- Supports the main database, external databases, and third-party APIs as data sources
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
### 2. AI employees, integrated into your business systems
|
|
52
|
+
Unlike standalone AI demos, NocoBase allows you to embed AI capabilities seamlessly into your interfaces, workflows, and data context, making AI truly useful in real business scenarios.
|
|
53
|
+
|
|
54
|
+
- Define AI employees for roles such as translator, analyst, researcher, or assistant
|
|
55
|
+
- Seamless AI–human collaboration in interfaces and workflows
|
|
56
|
+
- Ensure AI usage is secure, transparent, and customizable for your business needs
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
### 3. What you see is what you get, incredibly easy to use
|
|
61
|
+
|
|
62
|
+
While enabling the development of complex business systems, NocoBase keeps the experience simple and intuitive.
|
|
63
|
+
|
|
64
|
+
- One-click switch between usage mode and configuration mode
|
|
65
|
+
- Pages serve as a canvas to arrange blocks and actions, similar to Notion
|
|
66
|
+
- Configuration mode is designed for ordinary users, not just programmers
|
|
67
|
+
|
|
68
|
+

|
|
69
|
+
|
|
70
|
+
### 4. Everything is a plugin, designed for extension
|
|
71
|
+
Adding more no-code features will never cover every business case. NocoBase is built for extension through its plugin-based microkernel architecture.
|
|
72
|
+
|
|
73
|
+
- All functionalities are plugins, similar to WordPress
|
|
74
|
+
- Plugins are ready to use upon installation
|
|
75
|
+
- Pages, blocks, actions, APIs, and data sources can all be extended through custom plugins
|
|
76
|
+
|
|
77
|
+

|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
NocoBase supports three installation methods:
|
|
82
|
+
|
|
83
|
+
- <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/docker-compose">Installing With Docker (👍Recommended)</a>
|
|
84
|
+
|
|
85
|
+
Suitable for no-code scenarios, no code to write. When upgrading, just download the latest image and reboot.
|
|
86
|
+
|
|
87
|
+
- <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/create-nocobase-app">Installing from create-nocobase-app CLI</a>
|
|
88
|
+
|
|
89
|
+
The business code of the project is completely independent and supports low-code development.
|
|
90
|
+
|
|
91
|
+
- <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/git-clone">Installing from Git source code</a>
|
|
92
|
+
|
|
93
|
+
If you want to experience the latest unreleased version, or want to participate in the contribution, you need to make changes and debug on the source code, it is recommended to choose this installation method, which requires a high level of development skills, and if the code has been updated, you can git pull the latest code.
|
|
94
|
+
|
|
95
|
+
## How NocoBase works
|
|
96
|
+
|
|
97
|
+
<video width="100%" controls>
|
|
98
|
+
<source src="https://github.com/user-attachments/assets/8d183b44-9bb5-4792-b08f-bc08fe8dfaaf" type="video/mp4">
|
|
99
|
+
</video>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_logger=self.webpackChunk_nocobase_plugin_logger||[]).push([["748"],{503:function(e,t,r){r.r(t),r.d(t,{LogsDownloader:function(){return v}});var n=r(342),o=r(155),l=r.n(o),a=r(59),c=r(375),i=r(872),u=r(625);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function y(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var l=[],a=!0,c=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(l.push(r.value),!t||l.length!==t);a=!0);}catch(e){c=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(c)throw n}}return l}}(e,t)||m(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}}var h=a.Typography.Paragraph,g=a.Typography.Text,b=l().memo(function(){var e=(0,i.Zb)().t;return l().createElement(a.Typography,null,l().createElement(h,null,l().createElement(g,{code:!0},"request_*.log")," - ",e("API request and response logs")),l().createElement(h,null,l().createElement(g,{code:!0},"system_*.log")," -"," ",e("Application, database, plugins and other system logs, the error level logs will be sent to")," ",l().createElement(g,{code:!0},"system_error_*.log")),l().createElement(h,null,l().createElement(g,{code:!0},"sql_*.log")," - ",e("SQL execution logs, printed by Sequelize when the db logging is enabled")))});b.displayName="Tips";var v=l().memo(function(e){var t=a.theme.useToken().token,r=(0,i.Zb)().t,s=(0,u.useMemoizedFn)(r),m=(0,n.useAPIClient)(),h=f(l().useState(["0"]),2),g=h[0],v=h[1],E=f(l().useState(""),2),w=E[0],O=E[1],S=f(l().useState(!0),2),k=S[0],j=S[1],P=f(l().useState([]),2),A=P[0],x=P[1],T=(0,n.useRequest)(function(){return m.resource("logger").list().then(function(e){var t;return null==(t=e.data)?void 0:t.data})}).data,_=(0,o.useCallback)(function(e,t){return e.map(function(e,r){var n="".concat(t,"-").concat(r);return"string"==typeof e?{title:e,key:n,icon:l().createElement(c.FileOutlined,null)}:{title:e.name,key:n,icon:l().createElement(c.FolderOutlined,null),children:_(e.files,n)}})},[]),I=(0,o.useMemo)(function(){var e=T||[];return[{title:s("All"),key:"0",children:_(e,"0")}]},[T,_,s]),C=l().useMemo(function(){if(!w)return I;var e=function(r){var n=[],o=!0,a=!1,c=void 0;try{for(var i,u=r[Symbol.iterator]();!(o=(i=u.next()).done);o=!0){var s=i.value,f=s.title,d=f.indexOf(w),m=f.substring(0,d),h=f.substring(d+w.length),g=d>-1?l().createElement("span",null,m,l().createElement("span",{style:{color:t.colorPrimary}},w),h):l().createElement("span",null,f);if(d>-1)n.push(y(p({},s),{title:g}));else if(s.children){var b=e(s.children);b.length&&n.push(y(p({},s),{title:g,children:b}))}}}catch(e){a=!0,c=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw c}}return n};return e(I)},[w,I,t.colorPrimary]);return l().createElement(a.Card,{style:{minHeight:"700px"}},l().createElement(a.Alert,{message:"",description:l().createElement(b,null),type:"info",showIcon:!0}),l().createElement(a.Input.Search,{style:{marginTop:16,width:"450px"},placeholder:s("Search"),onChange:function(e){var t=e.target.value,r=function(e){return e.reduce(function(e,n){var o;return((null==(o=n.title)?void 0:o.includes(t))&&e.push(n),n.children)?d(e).concat(d(r(n.children))):e},[])};v(r(I).map(function(e){return e.key})),O(t),j(!0),x([])}}),l().createElement("div",{style:{maxHeight:"400px",width:"450px",overflow:"auto",border:"1px solid",marginTop:"6px",marginBottom:"10px",borderColor:t.colorBorder}},C.length?l().createElement(a.Tree,{checkable:!0,showIcon:!0,showLine:!0,checkedKeys:A,expandedKeys:g,autoExpandParent:k,onExpand:function(e){v(e),j(!1)},onCheck:function(e){return x(e)},treeData:C}):l().createElement(a.Empty,{image:a.Empty.PRESENTED_IMAGE_SIMPLE})),l().createElement(a.Button,{type:"primary",onClick:function(){var e=function(t,r){return t.reduce(function(t,n){var o=n.title;return(o="0"===n.key?o:"".concat(r,"/").concat(o),n.children)?d(t).concat(d(e(n.children,"0"===n.key?"":o))):(A.includes(n.key)&&"0"!==n.key&&t.push(o),t)},[])},t=e(I,"");t.length&&m.request({url:"logger:download",method:"post",responseType:"blob",data:{files:t}}).then(function(e){var t=window.URL.createObjectURL(new Blob([e.data],{type:"application/gzip"})),r=document.createElement("a");r.setAttribute("href",t),r.setAttribute("download","logs.tar.gz"),r.click(),r.remove()}).catch(function(e){console.log(e)})}},s("Download")," (.tar.gz)"))});v.displayName="LogsDownloader"}}]);
|
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("react-i18next"),require("react"),require("antd"),require("@nocobase/client"),require("@ant-design/icons")):"function"==typeof define&&define.amd?define("@nocobase/plugin-logger",["ahooks","react-i18next","react","antd","@nocobase/client","@ant-design/icons"],t):"object"==typeof exports?exports["@nocobase/plugin-logger"]=t(require("ahooks"),require("react-i18next"),require("react"),require("antd"),require("@nocobase/client"),require("@ant-design/icons")):e["@nocobase/plugin-logger"]=t(e.ahooks,e["react-i18next"],e.react,e.antd,e["@nocobase/client"],e["@ant-design/icons"])}(self,function(e,t,n,r,o,i){return function(){"use strict";var u,c,a,l={872:function(e,t,n){n.d(t,{Zb:function(){return c},vV:function(){return u}});var r=n(342),o=n(953),i="logger";function u(e){return r.i18n.t(e,{ns:i})}function c(){return(0,o.useTranslation)(i)}},375:function(e){e.exports=i},342:function(e){e.exports=o},625:function(t){t.exports=e},59:function(e){e.exports=r},155:function(e){e.exports=n},953:function(e){e.exports=t}},f={};function s(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return l[e](n,n.exports,s),n.exports}s.m=l,s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce(function(t,n){return s.f[n](e,t),t},[]))},s.u=function(e){return""+e+".6ffc402a5c68f16d.js"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p={},s.l=function(e,t,n,r){if(p[e])return void p[e].push(t);if(void 0!==n)for(var o,i,u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var a=u[c];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-logger:"+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@nocobase/plugin-logger:"+n),o.src=e),p[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=p[e];if(delete p[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},s.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.g.importScripts&&(d=s.g.location+"");var p,d,b=s.g.document;if(!d&&b&&(b.currentScript&&"SCRIPT"===b.currentScript.tagName.toUpperCase()&&(d=b.currentScript.src),!d)){var g=b.getElementsByTagName("script");if(g.length)for(var h=g.length-1;h>-1&&(!d||!/^http(s?):/.test(d));)d=g[h--].src}if(!d)throw Error("Automatic publicPath is not supported in this browser");s.p=d.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u={889:0},s.f.j=function(e,t){var n=s.o(u,e)?u[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=u[e]=[t,r]});t.push(n[2]=r);var o=s.p+s.u(e),i=Error();s.l(o,function(t){if(s.o(u,e)&&(0!==(n=u[e])&&(u[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},c=function(e,t){var n,r,o=t[0],i=t[1],c=t[2],a=0;if(o.some(function(e){return 0!==u[e]})){for(n in i)s.o(i,n)&&(s.m[n]=i[n]);c&&c(s)}for(e&&e(t);a<o.length;a++)r=o[a],s.o(u,r)&&u[r]&&u[r][0](),u[r]=0},(a=self.webpackChunk_nocobase_plugin_logger=self.webpackChunk_nocobase_plugin_logger||[]).forEach(c.bind(null,0)),a.push=c.bind(null,a.push.bind(a));var y={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-logger/dist/client/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",o=r.indexOf("/v2/");e=o>=0?r.slice(0,o+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-logger/dist/client/"}s.p=e}(),!function(){s.r(y),s.d(y,{PluginLoggerClient:function(){return p}});var e=s(342),t=s(872);function n(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function r(e){return function(){var t=this,r=arguments;return new Promise(function(o,i){var u=e.apply(t,r);function c(e){n(u,o,i,c,a,"next",e)}function a(e){n(u,o,i,c,a,"throw",e)}c(void 0)})}}function o(e,t,n){return(o=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&u(o,n.prototype),o}).apply(null,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return o(e,arguments,i(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)})(e)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function l(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(u,"next",{value:a(0)}),c(u,"throw",{value:a(1)}),c(u,"return",{value:a(2)}),"function"==typeof Symbol&&c(u,Symbol.iterator,{value:function(){return this}}),u;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var f=(0,e.lazy)(function(){return s.e("748").then(s.bind(s,503))},"LogsDownloader").LogsDownloader,p=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return e=o,t=arguments,e=i(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,a()?Reflect.construct(e,t||[],i(this).constructor):e.apply(this,t))}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&u(o,e),n=[{key:"afterAdd",value:function(){return r(function(){return l(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return r(function(){return l(this,function(e){return[2]})})()}},{key:"load",value:function(){return r(function(){return l(this,function(e){return this.app.pluginSettingsManager.add("logger",{title:(0,t.vV)("Logger"),icon:"FileTextOutlined",Component:f}),[2]})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,n),o}(c(e.Plugin));y.default=p}(),y}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-beta.
|
|
11
|
+
"@nocobase/client": "2.1.0-beta.21",
|
|
12
12
|
"react": "18.2.0",
|
|
13
13
|
"antd": "5.24.2",
|
|
14
14
|
"@ant-design/icons": "5.6.1",
|
|
15
15
|
"ahooks": "3.7.8",
|
|
16
|
-
"@nocobase/server": "2.1.0-beta.
|
|
16
|
+
"@nocobase/server": "2.1.0-beta.21",
|
|
17
17
|
"react-i18next": "11.18.6",
|
|
18
|
-
"@nocobase/actions": "2.1.0-beta.
|
|
19
|
-
"@nocobase/logger": "2.1.0-beta.
|
|
20
|
-
"lodash": "4.
|
|
18
|
+
"@nocobase/actions": "2.1.0-beta.21",
|
|
19
|
+
"@nocobase/logger": "2.1.0-beta.21",
|
|
20
|
+
"lodash": "4.18.1"
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){var e={497:function(e){function isBuffer(e){return Buffer.isBuffer(e)||e instanceof Uint8Array}function isEncoding(e){return Buffer.isEncoding(e)}function alloc(e,t,n){return Buffer.alloc(e,t,n)}function allocUnsafe(e){return Buffer.allocUnsafe(e)}function allocUnsafeSlow(e){return Buffer.allocUnsafeSlow(e)}function byteLength(e,t){return Buffer.byteLength(e,t)}function compare(e,t){return Buffer.compare(e,t)}function concat(e,t){return Buffer.concat(e,t)}function copy(e,t,n,i,r){return toBuffer(e).copy(t,n,i,r)}function equals(e,t){return toBuffer(e).equals(t)}function fill(e,t,n,i,r){return toBuffer(e).fill(t,n,i,r)}function from(e,t,n){return Buffer.from(e,t,n)}function includes(e,t,n,i){return toBuffer(e).includes(t,n,i)}function indexOf(e,t,n,i){return toBuffer(e).indexOf(t,n,i)}function lastIndexOf(e,t,n,i){return toBuffer(e).lastIndexOf(t,n,i)}function swap16(e){return toBuffer(e).swap16()}function swap32(e){return toBuffer(e).swap32()}function swap64(e){return toBuffer(e).swap64()}function toBuffer(e){if(Buffer.isBuffer(e))return e;return Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function toString(e,t,n,i){return toBuffer(e).toString(t,n,i)}function write(e,t,n,i,r){return toBuffer(e).write(t,n,i,r)}function writeDoubleLE(e,t,n){return toBuffer(e).writeDoubleLE(t,n)}function writeFloatLE(e,t,n){return toBuffer(e).writeFloatLE(t,n)}function writeUInt32LE(e,t,n){return toBuffer(e).writeUInt32LE(t,n)}function writeInt32LE(e,t,n){return toBuffer(e).writeInt32LE(t,n)}function readDoubleLE(e,t){return toBuffer(e).readDoubleLE(t)}function readFloatLE(e,t){return toBuffer(e).readFloatLE(t)}function readUInt32LE(e,t){return toBuffer(e).readUInt32LE(t)}function readInt32LE(e,t){return toBuffer(e).readInt32LE(t)}e.exports={isBuffer:isBuffer,isEncoding:isEncoding,alloc:alloc,allocUnsafe:allocUnsafe,allocUnsafeSlow:allocUnsafeSlow,byteLength:byteLength,compare:compare,concat:concat,copy:copy,equals:equals,fill:fill,from:from,includes:includes,indexOf:indexOf,lastIndexOf:lastIndexOf,swap16:swap16,swap32:swap32,swap64:swap64,toBuffer:toBuffer,toString:toString,write:write,writeDoubleLE:writeDoubleLE,writeFloatLE:writeFloatLE,writeUInt32LE:writeUInt32LE,writeInt32LE:writeInt32LE,readDoubleLE:readDoubleLE,readFloatLE:readFloatLE,readUInt32LE:readUInt32LE,readInt32LE:readInt32LE}},205:function(e,t,n){var i=n(223);var noop=function(){};var isRequest=function(e){return e.setHeader&&typeof e.abort==="function"};var isChildProcess=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var eos=function(e,t,n){if(typeof t==="function")return eos(e,null,t);if(!t)t={};n=i(n||noop);var r=e._writableState;var s=e._readableState;var a=t.readable||t.readable!==false&&e.readable;var o=t.writable||t.writable!==false&&e.writable;var u=false;var onlegacyfinish=function(){if(!e.writable)onfinish()};var onfinish=function(){o=false;if(!a)n.call(e)};var onend=function(){a=false;if(!o)n.call(e)};var onexit=function(t){n.call(e,t?new Error("exited with error code: "+t):null)};var onerror=function(t){n.call(e,t)};var onclose=function(){process.nextTick(onclosenexttick)};var onclosenexttick=function(){if(u)return;if(a&&!(s&&(s.ended&&!s.destroyed)))return n.call(e,new Error("premature close"));if(o&&!(r&&(r.ended&&!r.destroyed)))return n.call(e,new Error("premature close"))};var onrequest=function(){e.req.on("finish",onfinish)};if(isRequest(e)){e.on("complete",onfinish);e.on("abort",onclose);if(e.req)onrequest();else e.on("request",onrequest)}else if(o&&!r){e.on("end",onlegacyfinish);e.on("close",onlegacyfinish)}if(isChildProcess(e))e.on("exit",onexit);e.on("end",onend);e.on("finish",onfinish);if(t.error!==false)e.on("error",onerror);e.on("close",onclose);return function(){u=true;e.removeListener("complete",onfinish);e.removeListener("abort",onclose);e.removeListener("request",onrequest);if(e.req)e.req.removeListener("finish",onfinish);e.removeListener("end",onlegacyfinish);e.removeListener("close",onlegacyfinish);e.removeListener("finish",onfinish);e.removeListener("exit",onexit);e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose)}};e.exports=eos},30:function(e){e.exports=class FixedFIFO{constructor(e){if(!(e>0)||(e-1&e)!==0)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e);this.mask=e-1;this.top=0;this.btm=0;this.next=null}clear(){this.top=this.btm=0;this.next=null;this.buffer.fill(undefined)}push(e){if(this.buffer[this.top]!==undefined)return false;this.buffer[this.top]=e;this.top=this.top+1&this.mask;return true}shift(){const e=this.buffer[this.btm];if(e===undefined)return undefined;this.buffer[this.btm]=undefined;this.btm=this.btm+1&this.mask;return e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===undefined}}},958:function(e,t,n){const i=n(30);e.exports=class FastFIFO{constructor(e){this.hwm=e||16;this.head=new i(this.hwm);this.tail=this.head;this.length=0}clear(){this.head=this.tail;this.head.clear();this.length=0}push(e){this.length++;if(!this.head.push(e)){const t=this.head;this.head=t.next=new i(2*this.head.buffer.length);this.head.push(e)}}shift(){if(this.length!==0)this.length--;const e=this.tail.shift();if(e===undefined&&this.tail.next){const e=this.tail.next;this.tail.next=null;this.tail=e;return this.tail.shift()}return e}peek(){const e=this.tail.peek();if(e===undefined&&this.tail.next)return this.tail.next.peek();return e}isEmpty(){return this.length===0}}},614:function(e,t,n){var i=n(17);var r=n(358);var s=parseInt("0777",8);e.exports=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(e,t,n,a){if(typeof t==="function"){n=t;t={}}else if(!t||typeof t!=="object"){t={mode:t}}var o=t.mode;var u=t.fs||r;if(o===undefined){o=s&~process.umask()}if(!a)a=null;var l=n||function(){};e=i.resolve(e);u.mkdir(e,o,(function(n){if(!n){a=a||e;return l(null,a)}switch(n.code){case"ENOENT":mkdirP(i.dirname(e),t,(function(n,i){if(n)l(n,i);else mkdirP(e,t,l,i)}));break;default:u.stat(e,(function(e,t){if(e||!t.isDirectory())l(n,a);else l(null,a)}));break}}))}mkdirP.sync=function sync(e,t,n){if(!t||typeof t!=="object"){t={mode:t}}var a=t.mode;var o=t.fs||r;if(a===undefined){a=s&~process.umask()}if(!n)n=null;e=i.resolve(e);try{o.mkdirSync(e,a);n=n||e}catch(r){switch(r.code){case"ENOENT":n=sync(i.dirname(e),t,n);sync(e,t,n);break;default:var u;try{u=o.statSync(e)}catch(e){throw r}if(!u.isDirectory())throw r;break}}return n}},223:function(e,t,n){var i=n(940);e.exports=i(once);e.exports.strict=i(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(e){var f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},341:function(e,t,n){var i=n(223);var r=n(205);var s=n(358);var noop=function(){};var a=/^v?\.0/.test(process.version);var isFn=function(e){return typeof e==="function"};var isFS=function(e){if(!a)return false;if(!s)return false;return(e instanceof(s.ReadStream||noop)||e instanceof(s.WriteStream||noop))&&isFn(e.close)};var isRequest=function(e){return e.setHeader&&isFn(e.abort)};var destroyer=function(e,t,n,s){s=i(s);var a=false;e.on("close",(function(){a=true}));r(e,{readable:t,writable:n},(function(e){if(e)return s(e);a=true;s()}));var o=false;return function(t){if(a)return;if(o)return;o=true;if(isFS(e))return e.close(noop);if(isRequest(e))return e.abort();if(isFn(e.destroy))return e.destroy();s(t||new Error("stream was destroyed"))}};var call=function(e){e()};var pipe=function(e,t){return e.pipe(t)};var pump=function(){var e=Array.prototype.slice.call(arguments);var t=isFn(e[e.length-1]||noop)&&e.pop()||noop;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var n;var i=e.map((function(r,s){var a=s<e.length-1;var o=s>0;return destroyer(r,a,o,(function(e){if(!n)n=e;if(e)i.forEach(call);if(a)return;i.forEach(call);t(n)}))}));return e.reduce(pipe)};e.exports=pump},322:function(e,t,n){e.exports=typeof process!=="undefined"&&typeof process.nextTick==="function"?process.nextTick.bind(process):n(31)},31:function(e){e.exports=typeof queueMicrotask==="function"?queueMicrotask:e=>Promise.resolve().then(e)},147:function(e,t,n){const{EventEmitter:i}=n(361);const r=new Error("Stream was destroyed");const s=new Error("Premature close");const a=n(322);const o=n(958);const u=(1<<27)-1;const l=1;const c=2;const h=4;const d=8;const p=u^l;const _=u^c;const m=1<<4;const b=2<<4;const y=4<<4;const S=8<<4;const x=16<<4;const w=32<<4;const g=64<<4;const k=128<<4;const v=256<<4;const L=512<<4;const E=1024<<4;const T=2048<<4;const P=4096<<4;const I=x|w;const O=m|P;const B=y|m;const F=v|S;const z=u^m;const N=u^y;const q=u^(y|P);const W=u^P;const U=u^x;const D=u^(S|L);const R=u^g;const j=u^I;const A=u^T;const M=u^b;const H=1<<17;const C=2<<17;const G=4<<17;const K=8<<17;const V=16<<17;const J=32<<17;const Q=64<<17;const X=128<<17;const Y=256<<17;const Z=512<<17;const $=u^(H|Y);const ee=u^G;const te=u^Z;const ne=u^V;const ie=u^K;const re=u^X;const se=u^C;const ae=m|H;const oe=u^ae;const ue=E|J;const le=h|d|c;const fe=le|l;const ce=le|ue;const he=ee&N;const de=X|T;const pe=de&oe;const _e=fe|pe;const me=fe|g|E;const be=fe|E|S;const ye=fe|g|S;const Se=fe|v|S|L;const xe=fe|m|g|E|P;const we=le|g|E;const ge=b|fe|T|y;const ke=fe|Z|J;const ve=K|V;const Le=K|H;const Ee=K|V|fe|H;const Te=fe|H|K;const Pe=G|H;const Ie=H|Y;const Oe=fe|Z|Le|J;const Be=V|le|Z|J;const Fe=C|fe|X|G;const ze=Symbol.asyncIterator||Symbol("asyncIterator");class WritableState{constructor(e,{highWaterMark:t=16384,map:n=null,mapWritable:i,byteLength:r,byteLengthWritable:s}={}){this.stream=e;this.queue=new o;this.highWaterMark=t;this.buffered=0;this.error=null;this.pipeline=null;this.drains=null;this.byteLength=s||r||defaultByteLength;this.map=i||n;this.afterWrite=afterWrite.bind(this);this.afterUpdateNextTick=updateWriteNT.bind(this)}get ended(){return(this.stream._duplexState&J)!==0}push(e){if(this.map!==null)e=this.map(e);this.buffered+=this.byteLength(e);this.queue.push(e);if(this.buffered<this.highWaterMark){this.stream._duplexState|=K;return true}this.stream._duplexState|=ve;return false}shift(){const e=this.queue.shift();this.buffered-=this.byteLength(e);if(this.buffered===0)this.stream._duplexState&=ie;return e}end(e){if(typeof e==="function")this.stream.once("finish",e);else if(e!==undefined&&e!==null)this.push(e);this.stream._duplexState=(this.stream._duplexState|Z)&ee}autoBatch(e,t){const n=[];const i=this.stream;n.push(e);while((i._duplexState&Te)===Le){n.push(i._writableState.shift())}if((i._duplexState&fe)!==0)return t(null);i._writev(n,t)}update(){const e=this.stream;e._duplexState|=C;do{while((e._duplexState&Te)===K){const t=this.shift();e._duplexState|=Ie;e._write(t,this.afterWrite)}if((e._duplexState&Pe)===0)this.updateNonPrimary()}while(this.continueUpdate()===true);e._duplexState&=se}updateNonPrimary(){const e=this.stream;if((e._duplexState&Oe)===Z){e._duplexState=(e._duplexState|H)&te;e._final(afterFinal.bind(this));return}if((e._duplexState&le)===h){if((e._duplexState&de)===0){e._duplexState|=ae;e._destroy(afterDestroy.bind(this))}return}if((e._duplexState&_e)===l){e._duplexState=(e._duplexState|ae)&p;e._open(afterOpen.bind(this))}}continueUpdate(){if((this.stream._duplexState&X)===0)return false;this.stream._duplexState&=re;return true}updateCallback(){if((this.stream._duplexState&Fe)===G)this.update();else this.updateNextTick()}updateNextTick(){if((this.stream._duplexState&X)!==0)return;this.stream._duplexState|=X;if((this.stream._duplexState&C)===0)a(this.afterUpdateNextTick)}}class ReadableState{constructor(e,{highWaterMark:t=16384,map:n=null,mapReadable:i,byteLength:r,byteLengthReadable:s}={}){this.stream=e;this.queue=new o;this.highWaterMark=t;this.buffered=0;this.error=null;this.pipeline=null;this.byteLength=s||r||defaultByteLength;this.map=i||n;this.pipeTo=null;this.afterRead=afterRead.bind(this);this.afterUpdateNextTick=updateReadNT.bind(this)}get ended(){return(this.stream._duplexState&E)!==0}pipe(e,t){if(this.pipeTo!==null)throw new Error("Can only pipe to one destination");if(typeof t!=="function")t=null;this.stream._duplexState|=w;this.pipeTo=e;this.pipeline=new Pipeline(this.stream,e,t);if(t)this.stream.on("error",noop);if(isStreamx(e)){e._writableState.pipeline=this.pipeline;if(t)e.on("error",noop);e.on("finish",this.pipeline.finished.bind(this.pipeline))}else{const t=this.pipeline.done.bind(this.pipeline,e);const n=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",t);e.on("close",n);e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",afterDrain.bind(this));this.stream.emit("piping",e);e.emit("pipe",this.stream)}push(e){const t=this.stream;if(e===null){this.highWaterMark=0;t._duplexState=(t._duplexState|g)&q;return false}if(this.map!==null)e=this.map(e);this.buffered+=this.byteLength(e);this.queue.push(e);t._duplexState=(t._duplexState|S)&W;return this.buffered<this.highWaterMark}shift(){const e=this.queue.shift();this.buffered-=this.byteLength(e);if(this.buffered===0)this.stream._duplexState&=D;return e}unshift(e){const t=[this.map!==null?this.map(e):e];while(this.buffered>0)t.push(this.shift());for(let e=0;e<t.length-1;e++){const n=t[e];this.buffered+=this.byteLength(n);this.queue.push(n)}this.push(t[t.length-1])}read(){const e=this.stream;if((e._duplexState&be)===S){const t=this.shift();if(this.pipeTo!==null&&this.pipeTo.write(t)===false)e._duplexState&=j;if((e._duplexState&k)!==0)e.emit("data",t);return t}return null}drain(){const e=this.stream;while((e._duplexState&be)===S&&(e._duplexState&I)!==0){const t=this.shift();if(this.pipeTo!==null&&this.pipeTo.write(t)===false)e._duplexState&=j;if((e._duplexState&k)!==0)e.emit("data",t)}}update(){const e=this.stream;e._duplexState|=b;do{this.drain();while(this.buffered<this.highWaterMark&&(e._duplexState&xe)===0){e._duplexState|=O;e._read(this.afterRead);this.drain()}if((e._duplexState&Se)===F){e._duplexState|=L;e.emit("readable")}if((e._duplexState&B)===0)this.updateNonPrimary()}while(this.continueUpdate()===true);e._duplexState&=M}updateNonPrimary(){const e=this.stream;if((e._duplexState&ye)===g){e._duplexState=(e._duplexState|E)&R;e.emit("end");if((e._duplexState&ce)===ue)e._duplexState|=h;if(this.pipeTo!==null)this.pipeTo.end()}if((e._duplexState&le)===h){if((e._duplexState&de)===0){e._duplexState|=ae;e._destroy(afterDestroy.bind(this))}return}if((e._duplexState&_e)===l){e._duplexState=(e._duplexState|ae)&p;e._open(afterOpen.bind(this))}}continueUpdate(){if((this.stream._duplexState&T)===0)return false;this.stream._duplexState&=A;return true}updateCallback(){if((this.stream._duplexState&ge)===y)this.update();else this.updateNextTick()}updateNextTick(){if((this.stream._duplexState&T)!==0)return;this.stream._duplexState|=T;if((this.stream._duplexState&b)===0)a(this.afterUpdateNextTick)}}class TransformState{constructor(e){this.data=null;this.afterTransform=afterTransform.bind(e);this.afterFinal=null}}class Pipeline{constructor(e,t,n){this.from=e;this.to=t;this.afterPipe=n;this.error=null;this.pipeToFinished=false}finished(){this.pipeToFinished=true}done(e,t){if(t)this.error=t;if(e===this.to){this.to=null;if(this.from!==null){if((this.from._duplexState&E)===0||!this.pipeToFinished){this.from.destroy(this.error||new Error("Writable stream closed prematurely"))}return}}if(e===this.from){this.from=null;if(this.to!==null){if((e._duplexState&E)===0){this.to.destroy(this.error||new Error("Readable stream closed before ending"))}return}}if(this.afterPipe!==null)this.afterPipe(this.error);this.to=this.from=this.afterPipe=null}}function afterDrain(){this.stream._duplexState|=w;this.updateCallback()}function afterFinal(e){const t=this.stream;if(e)t.destroy(e);if((t._duplexState&le)===0){t._duplexState|=J;t.emit("finish")}if((t._duplexState&ce)===ue){t._duplexState|=h}t._duplexState&=$;if((t._duplexState&C)===0)this.update();else this.updateNextTick()}function afterDestroy(e){const t=this.stream;if(!e&&this.error!==r)e=this.error;if(e)t.emit("error",e);t._duplexState|=d;t.emit("close");const n=t._readableState;const i=t._writableState;if(n!==null&&n.pipeline!==null)n.pipeline.done(t,e);if(i!==null){while(i.drains!==null&&i.drains.length>0)i.drains.shift().resolve(false);if(i.pipeline!==null)i.pipeline.done(t,e)}}function afterWrite(e){const t=this.stream;if(e)t.destroy(e);t._duplexState&=$;if(this.drains!==null)tickDrains(this.drains);if((t._duplexState&Ee)===V){t._duplexState&=ne;if((t._duplexState&Q)===Q){t.emit("drain")}}this.updateCallback()}function afterRead(e){if(e)this.stream.destroy(e);this.stream._duplexState&=z;this.updateCallback()}function updateReadNT(){if((this.stream._duplexState&b)===0){this.stream._duplexState&=A;this.update()}}function updateWriteNT(){if((this.stream._duplexState&C)===0){this.stream._duplexState&=re;this.update()}}function tickDrains(e){for(let t=0;t<e.length;t++){if(--e[t].writes===0){e.shift().resolve(true);t--}}}function afterOpen(e){const t=this.stream;if(e)t.destroy(e);if((t._duplexState&h)===0){if((t._duplexState&me)===0)t._duplexState|=y;if((t._duplexState&ke)===0)t._duplexState|=G;t.emit("open")}t._duplexState&=oe;if(t._writableState!==null){t._writableState.updateCallback()}if(t._readableState!==null){t._readableState.updateCallback()}}function afterTransform(e,t){if(t!==undefined&&t!==null)this.push(t);this._writableState.afterWrite(e)}class Stream extends i{constructor(e){super();this._duplexState=0;this._readableState=null;this._writableState=null;if(e){if(e.open)this._open=e.open;if(e.destroy)this._destroy=e.destroy;if(e.predestroy)this._predestroy=e.predestroy;if(e.signal){e.signal.addEventListener("abort",abort.bind(this))}}}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState!==null?true:undefined}get writable(){return this._writableState!==null?true:undefined}get destroyed(){return(this._duplexState&d)!==0}get destroying(){return(this._duplexState&le)!==0}destroy(e){if((this._duplexState&le)===0){if(!e)e=r;this._duplexState=(this._duplexState|h)&he;if(this._readableState!==null){this._readableState.highWaterMark=0;this._readableState.error=e}if(this._writableState!==null){this._writableState.highWaterMark=0;this._writableState.error=e}this._duplexState|=c;this._predestroy();this._duplexState&=_;if(this._readableState!==null)this._readableState.updateNextTick();if(this._writableState!==null)this._writableState.updateNextTick()}}on(e,t){if(this._readableState!==null){if(e==="data"){this._duplexState|=k|x;this._readableState.updateNextTick()}if(e==="readable"){this._duplexState|=v;this._readableState.updateNextTick()}}if(this._writableState!==null){if(e==="drain"){this._duplexState|=Q;this._writableState.updateNextTick()}}return super.on(e,t)}}class Readable extends Stream{constructor(e){super(e);this._duplexState|=l|J;this._readableState=new ReadableState(this,e);if(e){if(e.read)this._read=e.read;if(e.eagerOpen)this._readableState.updateNextTick()}}_read(e){e(null)}pipe(e,t){this._readableState.updateNextTick();this._readableState.pipe(e,t);return e}read(){this._readableState.updateNextTick();return this._readableState.read()}push(e){this._readableState.updateNextTick();return this._readableState.push(e)}unshift(e){this._readableState.updateNextTick();return this._readableState.unshift(e)}resume(){this._duplexState|=x;this._readableState.updateNextTick();return this}pause(){this._duplexState&=U;return this}static _fromAsyncIterator(e,t){let n;const i=new Readable({...t,read(t){e.next().then(push).then(t.bind(null,null)).catch(t)},predestroy(){n=e.return()},destroy(e){if(!n)return e(null);n.then(e.bind(null,null)).catch(e)}});return i;function push(e){if(e.done)i.push(null);else i.push(e.value)}}static from(e,t){if(isReadStreamx(e))return e;if(e[ze])return this._fromAsyncIterator(e[ze](),t);if(!Array.isArray(e))e=e===undefined?[]:[e];let n=0;return new Readable({...t,read(t){this.push(n===e.length?null:e[n++]);t(null)}})}static isBackpressured(e){return(e._duplexState&we)!==0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&x)===0}[ze](){const e=this;let t=null;let n=null;let i=null;this.on("error",(e=>{t=e}));this.on("readable",onreadable);this.on("close",onclose);return{[ze](){return this},next(){return new Promise((function(t,r){n=t;i=r;const s=e.read();if(s!==null)ondata(s);else if((e._duplexState&d)!==0)ondata(null)}))},return(){return destroy(null)},throw(e){return destroy(e)}};function onreadable(){if(n!==null)ondata(e.read())}function onclose(){if(n!==null)ondata(null)}function ondata(s){if(i===null)return;if(t)i(t);else if(s===null&&(e._duplexState&E)===0)i(r);else n({value:s,done:s===null});i=n=null}function destroy(t){e.destroy(t);return new Promise(((n,i)=>{if(e._duplexState&d)return n({value:undefined,done:true});e.once("close",(function(){if(t)i(t);else n({value:undefined,done:true})}))}))}}}class Writable extends Stream{constructor(e){super(e);this._duplexState|=l|E;this._writableState=new WritableState(this,e);if(e){if(e.writev)this._writev=e.writev;if(e.write)this._write=e.write;if(e.final)this._final=e.final;if(e.eagerOpen)this._writableState.updateNextTick()}}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&Be)!==0}static drained(e){if(e.destroyed)return Promise.resolve(false);const t=e._writableState;const n=t.queue.length+(e._duplexState&Y?1:0);if(n===0)return Promise.resolve(true);if(t.drains===null)t.drains=[];return new Promise((e=>{t.drains.push({writes:n,resolve:e})}))}write(e){this._writableState.updateNextTick();return this._writableState.push(e)}end(e){this._writableState.updateNextTick();this._writableState.end(e);return this}}class Duplex extends Readable{constructor(e){super(e);this._duplexState=l;this._writableState=new WritableState(this,e);if(e){if(e.writev)this._writev=e.writev;if(e.write)this._write=e.write;if(e.final)this._final=e.final}}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}write(e){this._writableState.updateNextTick();return this._writableState.push(e)}end(e){this._writableState.updateNextTick();this._writableState.end(e);return this}}class Transform extends Duplex{constructor(e){super(e);this._transformState=new TransformState(this);if(e){if(e.transform)this._transform=e.transform;if(e.flush)this._flush=e.flush}}_write(e,t){if(this._readableState.buffered>=this._readableState.highWaterMark){this._transformState.data=e}else{this._transform(e,this._transformState.afterTransform)}}_read(e){if(this._transformState.data!==null){const t=this._transformState.data;this._transformState.data=null;e(null);this._transform(t,this._transformState.afterTransform)}else{e(null)}}_transform(e,t){t(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e;this._flush(transformAfterFlush.bind(this))}}class PassThrough extends Transform{}function transformAfterFlush(e,t){const n=this._transformState.afterFinal;if(e)return n(e);if(t!==null&&t!==undefined)this.push(t);this.push(null);n(null)}function pipelinePromise(...e){return new Promise(((t,n)=>pipeline(...e,(e=>{if(e)return n(e);t()}))))}function pipeline(e,...t){const n=Array.isArray(e)?[...e,...t]:[e,...t];const i=n.length&&typeof n[n.length-1]==="function"?n.pop():null;if(n.length<2)throw new Error("Pipeline requires at least 2 streams");let r=n[0];let a=null;let o=null;for(let e=1;e<n.length;e++){a=n[e];if(isStreamx(r)){r.pipe(a,onerror)}else{errorHandle(r,true,e>1,onerror);r.pipe(a)}r=a}if(i){let e=false;const t=isStreamx(a)||!!(a._writableState&&a._writableState.autoDestroy);a.on("error",(e=>{if(o===null)o=e}));a.on("finish",(()=>{e=true;if(!t)i(o)}));if(t){a.on("close",(()=>i(o||(e?null:s))))}}return a;function errorHandle(e,t,n,i){e.on("error",i);e.on("close",onclose);function onclose(){if(t&&e._readableState&&!e._readableState.ended)return i(s);if(n&&e._writableState&&!e._writableState.ended)return i(s)}}function onerror(e){if(!e||o)return;o=e;for(const t of n){t.destroy(e)}}}function isStream(e){return!!e._readableState||!!e._writableState}function isStreamx(e){return typeof e._duplexState==="number"&&isStream(e)}function getStreamError(e){const t=e._readableState&&e._readableState.error||e._writableState&&e._writableState.error;return t===r?null:t}function isReadStreamx(e){return isStreamx(e)&&e.readable}function isTypedArray(e){return typeof e==="object"&&e!==null&&typeof e.byteLength==="number"}function defaultByteLength(e){return isTypedArray(e)?e.byteLength:1024}function noop(){}function abort(){this.destroy(new Error("Stream aborted."))}e.exports={pipeline:pipeline,pipelinePromise:pipelinePromise,isStream:isStream,isStreamx:isStreamx,getStreamError:getStreamError,Stream:Stream,Writable:Writable,Readable:Readable,Duplex:Duplex,Transform:Transform,PassThrough:PassThrough}},220:function(e,t,n){const i={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{e.exports=n(358).constants||i}catch{e.exports=i}},545:function(e,t,n){const{Writable:i,Readable:r,getStreamError:s}=n(147);const a=n(958);const o=n(497);const u=n(834);const l=o.alloc(0);class BufferList{constructor(){this.buffered=0;this.shifted=0;this.queue=new a;this._offset=0}push(e){this.buffered+=e.byteLength;this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return l;let t=this._next(e);if(e===t.byteLength)return t;const n=[t];while((e-=t.byteLength)>0){t=this._next(e);n.push(t)}return o.concat(n)}_next(e){const t=this.queue.peek();const n=t.byteLength-this._offset;if(e>=n){const e=this._offset?t.subarray(this._offset,t.byteLength):t;this.queue.shift();this._offset=0;this.buffered-=n;this.shifted+=n;return e}this.buffered-=e;this.shifted+=e;return t.subarray(this._offset,this._offset+=e)}}class Source extends r{constructor(e,t,n){super();this.header=t;this.offset=n;this._parent=e}_read(e){if(this.header.size===0){this.push(null)}if(this._parent._stream===this){this._parent._update()}e(null)}_predestroy(){this._parent.destroy(s(this))}_detach(){if(this._parent._stream===this){this._parent._stream=null;this._parent._missing=overflow(this.header.size);this._parent._update()}}_destroy(e){this._detach();e(null)}}class Extract extends i{constructor(e){super(e);if(!e)e={};this._buffer=new BufferList;this._offset=0;this._header=null;this._stream=null;this._missing=0;this._longHeader=false;this._callback=noop;this._locked=false;this._finished=false;this._pax=null;this._paxGlobal=null;this._gnuLongPath=null;this._gnuLongLinkPath=null;this._filenameEncoding=e.filenameEncoding||"utf-8";this._allowUnknownFormat=!!e.allowUnknownFormat;this._unlockBound=this._unlock.bind(this)}_unlock(e){this._locked=false;if(e){this.destroy(e);this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return false;this._offset=this._buffer.shifted;try{this._header=u.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){this._continueWrite(e);return false}if(!this._header)return true;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":this._longHeader=true;this._missing=this._header.size;return true}this._locked=true;this._applyLongHeaders();if(this._header.size===0||this._header.type==="directory"){this.emit("entry",this._header,this._createStream(),this._unlockBound);return true}this._stream=this._createStream();this._missing=this._header.size;this.emit("entry",this._header,this._stream,this._unlockBound);return true}_applyLongHeaders(){if(this._gnuLongPath){this._header.name=this._gnuLongPath;this._gnuLongPath=null}if(this._gnuLongLinkPath){this._header.linkname=this._gnuLongLinkPath;this._gnuLongLinkPath=null}if(this._pax){if(this._pax.path)this._header.name=this._pax.path;if(this._pax.linkpath)this._header.linkname=this._pax.linkpath;if(this._pax.size)this._header.size=parseInt(this._pax.size,10);this._header.pax=this._pax;this._pax=null}}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=u.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=u.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=u.decodePax(e);break;case"pax-header":this._pax=this._paxGlobal===null?u.decodePax(e):Object.assign({},this._paxGlobal,u.decodePax(e));break}}_consumeLongHeader(){this._longHeader=false;this._missing=overflow(this._header.size);const e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(e){this._continueWrite(e);return false}return true}_consumeStream(){const e=this._buffer.shiftFirst(this._missing);if(e===null)return false;this._missing-=e.byteLength;const t=this._stream.push(e);if(this._missing===0){this._stream.push(null);if(t)this._stream._detach();return t&&this._locked===false}return t}_createStream(){return new Source(this,this._header,this._offset)}_update(){while(this._buffer.buffered>0&&!this.destroying){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===false)return;continue}if(this._longHeader===true){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===false)return false;continue}const e=this._buffer.shiftFirst(this._missing);if(e!==null)this._missing-=e.byteLength;continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===false)return}this._continueWrite(null)}_continueWrite(e){const t=this._callback;this._callback=noop;t(e)}_write(e,t){this._callback=t;this._buffer.push(e);this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0;e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){if(this._stream)this._stream.destroy(s(this));e(null)}[Symbol.asyncIterator](){let e=null;let t=null;let n=null;let i=null;let r=null;const s=this;this.on("entry",onentry);this.on("error",(t=>{e=t}));this.on("close",onclose);return{[Symbol.asyncIterator](){return this},next(){return new Promise(onnext)},return(){return destroy(null)},throw(e){return destroy(e)}};function consumeCallback(e){if(!r)return;const t=r;r=null;t(e)}function onnext(r,a){if(e){return a(e)}if(i){r({value:i,done:false});i=null;return}t=r;n=a;consumeCallback(null);if(s._finished&&t){t({value:undefined,done:true});t=n=null}}function onentry(e,s,a){r=a;s.on("error",noop);if(t){t({value:s,done:false});t=n=null}else{i=s}}function onclose(){consumeCallback(e);if(!t)return;if(e)n(e);else t({value:undefined,done:true});t=n=null}function destroy(e){s.destroy(e);consumeCallback(e);return new Promise(((t,n)=>{if(s.destroyed)return t({value:undefined,done:true});s.once("close",(function(){if(e)n(e);else t({value:undefined,done:true})}))}))}}}e.exports=function extract(e){return new Extract(e)};function noop(){}function overflow(e){e&=511;return e&&512-e}},834:function(e,t,n){const i=n(497);const r="0000000000000000000";const s="7777777777777777777";const a="0".charCodeAt(0);const o=i.from([117,115,116,97,114,0]);const u=i.from([a,a]);const l=i.from([117,115,116,97,114,32]);const c=i.from([32,0]);const h=4095;const d=257;const p=263;t.decodeLongPath=function decodeLongPath(e,t){return decodeStr(e,0,e.length,t)};t.encodePax=function encodePax(e){let t="";if(e.name)t+=addLength(" path="+e.name+"\n");if(e.linkname)t+=addLength(" linkpath="+e.linkname+"\n");const n=e.pax;if(n){for(const e in n){t+=addLength(" "+e+"="+n[e]+"\n")}}return i.from(t)};t.decodePax=function decodePax(e){const t={};while(e.length){let n=0;while(n<e.length&&e[n]!==32)n++;const r=parseInt(e.subarray(0,n).toString(),10);if(!r)return t;const s=i.toString(e.subarray(n+1,r-1));const a=s.indexOf("=");if(a===-1)return t;t[s.slice(0,a)]=s.slice(a+1);e=e.subarray(r)}return t};t.encode=function encode(e){const t=i.alloc(512);let n=e.name;let r="";if(e.typeflag===5&&n[n.length-1]!=="/")n+="/";if(i.byteLength(n)!==n.length)return null;while(i.byteLength(n)>100){const e=n.indexOf("/");if(e===-1)return null;r+=r?"/"+n.slice(0,e):n.slice(0,e);n=n.slice(e+1)}if(i.byteLength(n)>100||i.byteLength(r)>155)return null;if(e.linkname&&i.byteLength(e.linkname)>100)return null;i.write(t,n);i.write(t,encodeOct(e.mode&h,6),100);i.write(t,encodeOct(e.uid,6),108);i.write(t,encodeOct(e.gid,6),116);encodeSize(e.size,t,124);i.write(t,encodeOct(e.mtime.getTime()/1e3|0,11),136);t[156]=a+toTypeflag(e.type);if(e.linkname)i.write(t,e.linkname,157);i.copy(o,t,d);i.copy(u,t,p);if(e.uname)i.write(t,e.uname,265);if(e.gname)i.write(t,e.gname,297);i.write(t,encodeOct(e.devmajor||0,6),329);i.write(t,encodeOct(e.devminor||0,6),337);if(r)i.write(t,r,345);i.write(t,encodeOct(cksum(t),6),148);return t};t.decode=function decode(e,t,n){let i=e[156]===0?0:e[156]-a;let r=decodeStr(e,0,100,t);const s=decodeOct(e,100,8);const o=decodeOct(e,108,8);const u=decodeOct(e,116,8);const l=decodeOct(e,124,12);const c=decodeOct(e,136,12);const h=toType(i);const d=e[157]===0?null:decodeStr(e,157,100,t);const p=decodeStr(e,265,32);const _=decodeStr(e,297,32);const m=decodeOct(e,329,8);const b=decodeOct(e,337,8);const y=cksum(e);if(y===8*32)return null;if(y!==decodeOct(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(isUSTAR(e)){if(e[345])r=decodeStr(e,345,155,t)+"/"+r}else if(isGNU(e)){}else{if(!n){throw new Error("Invalid tar header: unknown format.")}}if(i===0&&r&&r[r.length-1]==="/")i=5;return{name:r,mode:s,uid:o,gid:u,size:l,mtime:new Date(1e3*c),type:h,linkname:d,uname:p,gname:_,devmajor:m,devminor:b,pax:null}};function isUSTAR(e){return i.equals(o,e.subarray(d,d+6))}function isGNU(e){return i.equals(l,e.subarray(d,d+6))&&i.equals(c,e.subarray(p,p+2))}function clamp(e,t,n){if(typeof e!=="number")return n;e=~~e;if(e>=t)return t;if(e>=0)return e;e+=t;if(e>=0)return e;return 0}function toType(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function toTypeflag(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function indexOf(e,t,n,i){for(;n<i;n++){if(e[n]===t)return n}return i}function cksum(e){let t=8*32;for(let n=0;n<148;n++)t+=e[n];for(let n=156;n<512;n++)t+=e[n];return t}function encodeOct(e,t){e=e.toString(8);if(e.length>t)return s.slice(0,t)+" ";return r.slice(0,t-e.length)+e+" "}function encodeSizeBin(e,t,n){t[n]=128;for(let i=11;i>0;i--){t[n+i]=e&255;e=Math.floor(e/256)}}function encodeSize(e,t,n){if(e.toString(8).length>11){encodeSizeBin(e,t,n)}else{i.write(t,encodeOct(e,11),n)}}function parse256(e){let t;if(e[0]===128)t=true;else if(e[0]===255)t=false;else return null;const n=[];let i;for(i=e.length-1;i>0;i--){const r=e[i];if(t)n.push(r);else n.push(255-r)}let r=0;const s=n.length;for(i=0;i<s;i++){r+=n[i]*Math.pow(256,i)}return t?r:-1*r}function decodeOct(e,t,n){e=e.subarray(t,t+n);t=0;if(e[t]&128){return parse256(e)}else{while(t<e.length&&e[t]===32)t++;const n=clamp(indexOf(e,32,t,e.length),e.length,e.length);while(t<n&&e[t]===0)t++;if(n===t)return 0;return parseInt(e.subarray(t,n).toString(),8)}}function decodeStr(e,t,n,r){return i.toString(e.subarray(t,indexOf(e,0,t,t+n)),r)}function addLength(e){const t=i.byteLength(e);let n=Math.floor(Math.log(t)/Math.log(10))+1;if(t+n>=Math.pow(10,n))n++;return t+n+e}},260:function(e,t,n){t.extract=n(545);t.pack=n(456)},456:function(e,t,n){const{Readable:i,Writable:r,getStreamError:s}=n(147);const a=n(497);const o=n(220);const u=n(834);const l=493;const c=420;const h=a.alloc(1024);class Sink extends r{constructor(e,t,n){super({mapWritable:mapWritable,eagerOpen:true});this.written=0;this.header=t;this._callback=n;this._linkname=null;this._isLinkname=t.type==="symlink"&&!t.linkname;this._isVoid=t.type!=="file"&&t.type!=="contiguous-file";this._finished=false;this._pack=e;this._openCallback=null;if(this._pack._stream===null)this._pack._stream=this;else this._pack._pending.push(this)}_open(e){this._openCallback=e;if(this._pack._stream===this)this._continueOpen()}_continuePack(e){if(this._callback===null)return;const t=this._callback;this._callback=null;t(e)}_continueOpen(){if(this._pack._stream===null)this._pack._stream=this;const e=this._openCallback;this._openCallback=null;if(e===null)return;if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this;if(!this._isLinkname){this._pack._encode(this.header)}if(this._isVoid){this._finish();this._continuePack(null)}e(null)}_write(e,t){if(this._isLinkname){this._linkname=this._linkname?a.concat([this._linkname,e]):e;return t(null)}if(this._isVoid){if(e.byteLength>0){return t(new Error("No body allowed for this entry"))}return t()}this.written+=e.byteLength;if(this._pack.push(e))return t();this._pack._drain=t}_finish(){if(this._finished)return;this._finished=true;if(this._isLinkname){this.header.linkname=this._linkname?a.toString(this._linkname,"utf-8"):"";this._pack._encode(this.header)}overflow(this._pack,this.header.size);this._pack._done(this)}_final(e){if(this.written!==this.header.size){return e(new Error("Size mismatch"))}this._finish();e(null)}_getError(){return s(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this);this._continuePack(this._finished?null:this._getError());e()}}class Pack extends i{constructor(e){super(e);this._drain=noop;this._finalized=false;this._finalizing=false;this._pending=[];this._stream=null}entry(e,t,n){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");if(typeof t==="function"){n=t;t=null}if(!n)n=noop;if(!e.size||e.type==="symlink")e.size=0;if(!e.type)e.type=modeToType(e.mode);if(!e.mode)e.mode=e.type==="directory"?l:c;if(!e.uid)e.uid=0;if(!e.gid)e.gid=0;if(!e.mtime)e.mtime=new Date;if(typeof t==="string")t=a.from(t);const i=new Sink(this,e,n);if(a.isBuffer(t)){e.size=t.byteLength;i.write(t);i.end();return i}if(i._isVoid){return i}return i}finalize(){if(this._stream||this._pending.length>0){this._finalizing=true;return}if(this._finalized)return;this._finalized=true;this.push(h);this.push(null)}_done(e){if(e!==this._stream)return;this._stream=null;if(this._finalizing)this.finalize();if(this._pending.length)this._pending.shift()._continueOpen()}_encode(e){if(!e.pax){const t=u.encode(e);if(t){this.push(t);return}}this._encodePax(e)}_encodePax(e){const t=u.encodePax({name:e.name,linkname:e.linkname,pax:e.pax});const n={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(u.encode(n));this.push(t);overflow(this,t.byteLength);n.size=e.size;n.type=e.type;this.push(u.encode(n))}_doDrain(){const e=this._drain;this._drain=noop;e()}_predestroy(){const e=s(this);if(this._stream)this._stream.destroy(e);while(this._pending.length){const t=this._pending.shift();t.destroy(e);t._continueOpen()}this._doDrain()}_read(e){this._doDrain();e()}}e.exports=function pack(e){return new Pack(e)};function modeToType(e){switch(e&o.S_IFMT){case o.S_IFBLK:return"block-device";case o.S_IFCHR:return"character-device";case o.S_IFDIR:return"directory";case o.S_IFIFO:return"fifo";case o.S_IFLNK:return"symlink"}return"file"}function noop(){}function overflow(e,t){t&=511;if(t)e.push(h.subarray(0,512-t))}function mapWritable(e){return a.isBuffer(e)?e:a.from(e)}},940:function(e){e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var n=0;n<t.length;n++){t[n]=arguments[n]}var i=e.apply(this,t);var r=t[t.length-1];if(typeof i==="function"&&i!==r){Object.keys(r).forEach((function(e){i[e]=r[e]}))}return i}}},361:function(e){"use strict";e.exports=require("events")},358:function(e){"use strict";e.exports=require("fs")},17:function(e){"use strict";e.exports=require("path")}};var t={};function __nccwpck_require__(n){var i=t[n];if(i!==undefined){return i.exports}var r=t[n]={exports:{}};var s=true;try{e[n](r,r.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};!function(){var e=n;const t=__nccwpck_require__(260);const i=__nccwpck_require__(341);const r=__nccwpck_require__(614);const s=__nccwpck_require__(358);const a=__nccwpck_require__(17);const o=process.platform==="win32";e.pack=function pack(e,n){if(!e)e=".";if(!n)n={};const r=n.fs||s;const o=n.ignore||n.filter||noop;const u=n.mapStream||echo;const l=statAll(r,n.dereference?r.stat:r.lstat,e,o,n.entries,n.sort);const c=n.strict!==false;const h=typeof n.umask==="number"?~n.umask:~processUmask();const pack=n.pack||t.pack();const d=n.finish||noop;let p=n.map||noop;let _=typeof n.dmode==="number"?n.dmode:0;let m=typeof n.fmode==="number"?n.fmode:0;if(n.strip)p=strip(p,n.strip);if(n.readable){_|=parseInt(555,8);m|=parseInt(444,8)}if(n.writable){_|=parseInt(333,8);m|=parseInt(222,8)}onnextentry();function onsymlink(t,n){r.readlink(a.join(e,t),(function(e,t){if(e)return pack.destroy(e);n.linkname=normalize(t);pack.entry(n,onnextentry)}))}function onstat(t,s,o){if(t)return pack.destroy(t);if(!s){if(n.finalize!==false)pack.finalize();return d(pack)}if(o.isSocket())return onnextentry();let l={name:normalize(s),mode:(o.mode|(o.isDirectory()?_:m))&h,mtime:o.mtime,size:o.size,type:"file",uid:o.uid,gid:o.gid};if(o.isDirectory()){l.size=0;l.type="directory";l=p(l)||l;return pack.entry(l,onnextentry)}if(o.isSymbolicLink()){l.size=0;l.type="symlink";l=p(l)||l;return onsymlink(s,l)}l=p(l)||l;if(!o.isFile()){if(c)return pack.destroy(new Error("unsupported type for "+s));return onnextentry()}const b=pack.entry(l,onnextentry);const y=u(r.createReadStream(a.join(e,s),{start:0,end:l.size>0?l.size-1:l.size}),l);y.on("error",(function(e){b.destroy(e)}));i(y,b)}function onnextentry(e){if(e)return pack.destroy(e);l(onstat)}return pack};function head(e){return e.length?e[e.length-1]:null}function processGetuid(){return process.getuid?process.getuid():-1}function processUmask(){return process.umask?process.umask():0}e.extract=function extract(e,n){if(!e)e=".";if(!n)n={};const u=n.fs||s;const l=n.ignore||n.filter||noop;const c=n.mapStream||echo;const h=n.chown!==false&&!o&&processGetuid()===0;const extract=n.extract||t.extract();const d=[];const p=new Date;const _=typeof n.umask==="number"?~n.umask:~processUmask();const m=n.strict!==false;let b=n.map||noop;let y=typeof n.dmode==="number"?n.dmode:0;let S=typeof n.fmode==="number"?n.fmode:0;if(n.strip)b=strip(b,n.strip);if(n.readable){y|=parseInt(555,8);S|=parseInt(444,8)}if(n.writable){y|=parseInt(333,8);S|=parseInt(222,8)}extract.on("entry",onentry);if(n.finish)extract.on("finish",n.finish);return extract;function onentry(t,r,s){t=b(t)||t;t.name=normalize(t.name);const p=a.join(e,a.join("/",t.name));if(l(p,t)){r.resume();return s()}if(t.type==="directory"){d.push([p,t.mtime]);return mkdirfix(p,{fs:u,own:h,uid:t.uid,gid:t.gid,mode:t.mode},stat)}const _=a.dirname(p);validate(u,_,a.join(e,"."),(function(e,n){if(e)return s(e);if(!n)return s(new Error(_+" is not a valid path"));mkdirfix(_,{fs:u,own:h,uid:t.uid,gid:t.gid,mode:493},(function(e){if(e)return s(e);switch(t.type){case"file":return onfile();case"link":return onlink();case"symlink":return onsymlink()}if(m)return s(new Error("unsupported type for "+p+" ("+t.type+")"));r.resume();s()}))}));function stat(e){if(e)return s(e);utimes(p,t,(function(e){if(e)return s(e);if(o)return s();chperm(p,t,s)}))}function onsymlink(){if(o)return s();u.unlink(p,(function(){u.symlink(t.linkname,p,stat)}))}function onlink(){if(o)return s();u.unlink(p,(function(){const i=a.join(e,a.join("/",t.linkname));u.link(i,p,(function(e){if(e&&e.code==="EPERM"&&n.hardlinkAsFilesFallback){r=u.createReadStream(i);return onfile()}stat(e)}))}))}function onfile(){const e=u.createWriteStream(p);const n=c(r,t);e.on("error",(function(e){n.destroy(e)}));i(n,e,(function(t){if(t)return s(t);e.on("close",stat)}))}}function utimesParent(e,t){let n;while((n=head(d))&&e.slice(0,n[0].length)!==n[0])d.pop();if(!n)return t();u.utimes(n[0],p,n[1],t)}function utimes(e,t,i){if(n.utimes===false)return i();if(t.type==="directory")return u.utimes(e,p,t.mtime,i);if(t.type==="symlink")return utimesParent(e,i);u.utimes(e,p,t.mtime,(function(t){if(t)return i(t);utimesParent(e,i)}))}function chperm(e,t,n){const i=t.type==="symlink";const r=i?u.lchmod:u.chmod;const s=i?u.lchown:u.chown;if(!r)return n();const a=(t.mode|(t.type==="directory"?y:S))&_;if(s&&h)s.call(u,e,t.uid,t.gid,onchown);else onchown(null);function onchown(t){if(t)return n(t);if(!r)return n();r.call(u,e,a,n)}}function mkdirfix(e,t,n){u.stat(e,(function(i){if(!i)return n(null);if(i.code!=="ENOENT")return n(i);r(e,{fs:t.fs,mode:t.mode},(function(i,r){if(i)return n(i);chperm(e,t,n)}))}))}};function validate(e,t,n,i){if(t===n)return i(null,true);e.lstat(t,(function(r,s){if(r&&r.code==="ENOENT")return validate(e,a.join(t,".."),n,i);else if(r)return i(r);i(null,s.isDirectory())}))}function noop(){}function echo(e){return e}function normalize(e){return o?e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_"):e}function statAll(e,t,n,i,r,s){if(!r)r=["."];const o=r.slice(0);return function loop(u){if(!o.length)return u(null);const l=o.shift();const c=a.join(n,l);t.call(e,c,(function(t,h){if(t)return u(r.indexOf(l)===-1&&t.code==="ENOENT"?null:t);if(!h.isDirectory())return u(null,l,h);e.readdir(c,(function(e,t){if(e)return u(e);if(s)t.sort();for(let e=0;e<t.length;e++){if(!i(a.join(n,l,t[e])))o.push(a.join(l,t[e]))}u(null,l,h)}))}))}}function strip(e,t){return function(n){n.name=n.name.split("/").slice(t).join("/");const i=n.linkname;if(i&&(n.type==="link"||a.isAbsolute(i))){n.linkname=i.split("/").slice(t).join("/")}return e(n)}}}();module.exports=n})();
|
|
1
|
+
(()=>{var e={497:e=>{function isBuffer(e){return Buffer.isBuffer(e)||e instanceof Uint8Array}function isEncoding(e){return Buffer.isEncoding(e)}function alloc(e,t,n){return Buffer.alloc(e,t,n)}function allocUnsafe(e){return Buffer.allocUnsafe(e)}function allocUnsafeSlow(e){return Buffer.allocUnsafeSlow(e)}function byteLength(e,t){return Buffer.byteLength(e,t)}function compare(e,t){return Buffer.compare(e,t)}function concat(e,t){return Buffer.concat(e,t)}function copy(e,t,n,r,i){return toBuffer(e).copy(t,n,r,i)}function equals(e,t){return toBuffer(e).equals(t)}function fill(e,t,n,r,i){return toBuffer(e).fill(t,n,r,i)}function from(e,t,n){return Buffer.from(e,t,n)}function includes(e,t,n,r){return toBuffer(e).includes(t,n,r)}function indexOf(e,t,n,r){return toBuffer(e).indexOf(t,n,r)}function lastIndexOf(e,t,n,r){return toBuffer(e).lastIndexOf(t,n,r)}function swap16(e){return toBuffer(e).swap16()}function swap32(e){return toBuffer(e).swap32()}function swap64(e){return toBuffer(e).swap64()}function toBuffer(e){if(Buffer.isBuffer(e))return e;return Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function toString(e,t,n,r){return toBuffer(e).toString(t,n,r)}function write(e,t,n,r,i){return toBuffer(e).write(t,n,r,i)}function writeDoubleLE(e,t,n){return toBuffer(e).writeDoubleLE(t,n)}function writeFloatLE(e,t,n){return toBuffer(e).writeFloatLE(t,n)}function writeUInt32LE(e,t,n){return toBuffer(e).writeUInt32LE(t,n)}function writeInt32LE(e,t,n){return toBuffer(e).writeInt32LE(t,n)}function readDoubleLE(e,t){return toBuffer(e).readDoubleLE(t)}function readFloatLE(e,t){return toBuffer(e).readFloatLE(t)}function readUInt32LE(e,t){return toBuffer(e).readUInt32LE(t)}function readInt32LE(e,t){return toBuffer(e).readInt32LE(t)}e.exports={isBuffer:isBuffer,isEncoding:isEncoding,alloc:alloc,allocUnsafe:allocUnsafe,allocUnsafeSlow:allocUnsafeSlow,byteLength:byteLength,compare:compare,concat:concat,copy:copy,equals:equals,fill:fill,from:from,includes:includes,indexOf:indexOf,lastIndexOf:lastIndexOf,swap16:swap16,swap32:swap32,swap64:swap64,toBuffer:toBuffer,toString:toString,write:write,writeDoubleLE:writeDoubleLE,writeFloatLE:writeFloatLE,writeUInt32LE:writeUInt32LE,writeInt32LE:writeInt32LE,readDoubleLE:readDoubleLE,readFloatLE:readFloatLE,readUInt32LE:readUInt32LE,readInt32LE:readInt32LE}},205:(e,t,n)=>{var r=n(223);var noop=function(){};var isRequest=function(e){return e.setHeader&&typeof e.abort==="function"};var isChildProcess=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var eos=function(e,t,n){if(typeof t==="function")return eos(e,null,t);if(!t)t={};n=r(n||noop);var i=e._writableState;var s=e._readableState;var a=t.readable||t.readable!==false&&e.readable;var o=t.writable||t.writable!==false&&e.writable;var u=false;var onlegacyfinish=function(){if(!e.writable)onfinish()};var onfinish=function(){o=false;if(!a)n.call(e)};var onend=function(){a=false;if(!o)n.call(e)};var onexit=function(t){n.call(e,t?new Error("exited with error code: "+t):null)};var onerror=function(t){n.call(e,t)};var onclose=function(){process.nextTick(onclosenexttick)};var onclosenexttick=function(){if(u)return;if(a&&!(s&&(s.ended&&!s.destroyed)))return n.call(e,new Error("premature close"));if(o&&!(i&&(i.ended&&!i.destroyed)))return n.call(e,new Error("premature close"))};var onrequest=function(){e.req.on("finish",onfinish)};if(isRequest(e)){e.on("complete",onfinish);e.on("abort",onclose);if(e.req)onrequest();else e.on("request",onrequest)}else if(o&&!i){e.on("end",onlegacyfinish);e.on("close",onlegacyfinish)}if(isChildProcess(e))e.on("exit",onexit);e.on("end",onend);e.on("finish",onfinish);if(t.error!==false)e.on("error",onerror);e.on("close",onclose);return function(){u=true;e.removeListener("complete",onfinish);e.removeListener("abort",onclose);e.removeListener("request",onrequest);if(e.req)e.req.removeListener("finish",onfinish);e.removeListener("end",onlegacyfinish);e.removeListener("close",onlegacyfinish);e.removeListener("finish",onfinish);e.removeListener("exit",onexit);e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose)}};e.exports=eos},30:e=>{e.exports=class FixedFIFO{constructor(e){if(!(e>0)||(e-1&e)!==0)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e);this.mask=e-1;this.top=0;this.btm=0;this.next=null}clear(){this.top=this.btm=0;this.next=null;this.buffer.fill(undefined)}push(e){if(this.buffer[this.top]!==undefined)return false;this.buffer[this.top]=e;this.top=this.top+1&this.mask;return true}shift(){const e=this.buffer[this.btm];if(e===undefined)return undefined;this.buffer[this.btm]=undefined;this.btm=this.btm+1&this.mask;return e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===undefined}}},958:(e,t,n)=>{const r=n(30);e.exports=class FastFIFO{constructor(e){this.hwm=e||16;this.head=new r(this.hwm);this.tail=this.head;this.length=0}clear(){this.head=this.tail;this.head.clear();this.length=0}push(e){this.length++;if(!this.head.push(e)){const t=this.head;this.head=t.next=new r(2*this.head.buffer.length);this.head.push(e)}}shift(){if(this.length!==0)this.length--;const e=this.tail.shift();if(e===undefined&&this.tail.next){const e=this.tail.next;this.tail.next=null;this.tail=e;return this.tail.shift()}return e}peek(){const e=this.tail.peek();if(e===undefined&&this.tail.next)return this.tail.next.peek();return e}isEmpty(){return this.length===0}}},614:(e,t,n)=>{var r=n(17);var i=n(358);var s=parseInt("0777",8);e.exports=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(e,t,n,a){if(typeof t==="function"){n=t;t={}}else if(!t||typeof t!=="object"){t={mode:t}}var o=t.mode;var u=t.fs||i;if(o===undefined){o=s&~process.umask()}if(!a)a=null;var l=n||function(){};e=r.resolve(e);u.mkdir(e,o,(function(n){if(!n){a=a||e;return l(null,a)}switch(n.code){case"ENOENT":mkdirP(r.dirname(e),t,(function(n,r){if(n)l(n,r);else mkdirP(e,t,l,r)}));break;default:u.stat(e,(function(e,t){if(e||!t.isDirectory())l(n,a);else l(null,a)}));break}}))}mkdirP.sync=function sync(e,t,n){if(!t||typeof t!=="object"){t={mode:t}}var a=t.mode;var o=t.fs||i;if(a===undefined){a=s&~process.umask()}if(!n)n=null;e=r.resolve(e);try{o.mkdirSync(e,a);n=n||e}catch(i){switch(i.code){case"ENOENT":n=sync(r.dirname(e),t,n);sync(e,t,n);break;default:var u;try{u=o.statSync(e)}catch(e){throw i}if(!u.isDirectory())throw i;break}}return n}},223:(e,t,n)=>{var r=n(940);e.exports=r(once);e.exports.strict=r(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(e){var f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},341:(e,t,n)=>{var r=n(223);var i=n(205);var s=n(358);var noop=function(){};var a=/^v?\.0/.test(process.version);var isFn=function(e){return typeof e==="function"};var isFS=function(e){if(!a)return false;if(!s)return false;return(e instanceof(s.ReadStream||noop)||e instanceof(s.WriteStream||noop))&&isFn(e.close)};var isRequest=function(e){return e.setHeader&&isFn(e.abort)};var destroyer=function(e,t,n,s){s=r(s);var a=false;e.on("close",(function(){a=true}));i(e,{readable:t,writable:n},(function(e){if(e)return s(e);a=true;s()}));var o=false;return function(t){if(a)return;if(o)return;o=true;if(isFS(e))return e.close(noop);if(isRequest(e))return e.abort();if(isFn(e.destroy))return e.destroy();s(t||new Error("stream was destroyed"))}};var call=function(e){e()};var pipe=function(e,t){return e.pipe(t)};var pump=function(){var e=Array.prototype.slice.call(arguments);var t=isFn(e[e.length-1]||noop)&&e.pop()||noop;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var n;var r=e.map((function(i,s){var a=s<e.length-1;var o=s>0;return destroyer(i,a,o,(function(e){if(!n)n=e;if(e)r.forEach(call);if(a)return;r.forEach(call);t(n)}))}));return e.reduce(pipe)};e.exports=pump},322:(e,t,n)=>{e.exports=typeof process!=="undefined"&&typeof process.nextTick==="function"?process.nextTick.bind(process):n(31)},31:e=>{e.exports=typeof queueMicrotask==="function"?queueMicrotask:e=>Promise.resolve().then(e)},147:(e,t,n)=>{const{EventEmitter:r}=n(361);const i=new Error("Stream was destroyed");const s=new Error("Premature close");const a=n(322);const o=n(958);const u=(1<<27)-1;const l=1;const c=2;const h=4;const d=8;const p=u^l;const _=u^c;const m=1<<4;const b=2<<4;const y=4<<4;const S=8<<4;const x=16<<4;const w=32<<4;const g=64<<4;const k=128<<4;const v=256<<4;const L=512<<4;const E=1024<<4;const T=2048<<4;const P=4096<<4;const I=x|w;const O=m|P;const B=y|m;const F=v|S;const z=u^m;const N=u^y;const q=u^(y|P);const W=u^P;const U=u^x;const D=u^(S|L);const R=u^g;const j=u^I;const A=u^T;const M=u^b;const H=1<<17;const C=2<<17;const G=4<<17;const K=8<<17;const V=16<<17;const J=32<<17;const Q=64<<17;const X=128<<17;const Y=256<<17;const Z=512<<17;const $=u^(H|Y);const ee=u^G;const te=u^Z;const ne=u^V;const re=u^K;const ie=u^X;const se=u^C;const ae=m|H;const oe=u^ae;const ue=E|J;const le=h|d|c;const fe=le|l;const ce=le|ue;const he=ee&N;const de=X|T;const pe=de&oe;const _e=fe|pe;const me=fe|g|E;const be=fe|E|S;const ye=fe|g|S;const Se=fe|v|S|L;const xe=fe|m|g|E|P;const we=le|g|E;const ge=b|fe|T|y;const ke=fe|Z|J;const ve=K|V;const Le=K|H;const Ee=K|V|fe|H;const Te=fe|H|K;const Pe=G|H;const Ie=H|Y;const Oe=fe|Z|Le|J;const Be=V|le|Z|J;const Fe=C|fe|X|G;const ze=Symbol.asyncIterator||Symbol("asyncIterator");class WritableState{constructor(e,{highWaterMark:t=16384,map:n=null,mapWritable:r,byteLength:i,byteLengthWritable:s}={}){this.stream=e;this.queue=new o;this.highWaterMark=t;this.buffered=0;this.error=null;this.pipeline=null;this.drains=null;this.byteLength=s||i||defaultByteLength;this.map=r||n;this.afterWrite=afterWrite.bind(this);this.afterUpdateNextTick=updateWriteNT.bind(this)}get ended(){return(this.stream._duplexState&J)!==0}push(e){if(this.map!==null)e=this.map(e);this.buffered+=this.byteLength(e);this.queue.push(e);if(this.buffered<this.highWaterMark){this.stream._duplexState|=K;return true}this.stream._duplexState|=ve;return false}shift(){const e=this.queue.shift();this.buffered-=this.byteLength(e);if(this.buffered===0)this.stream._duplexState&=re;return e}end(e){if(typeof e==="function")this.stream.once("finish",e);else if(e!==undefined&&e!==null)this.push(e);this.stream._duplexState=(this.stream._duplexState|Z)&ee}autoBatch(e,t){const n=[];const r=this.stream;n.push(e);while((r._duplexState&Te)===Le){n.push(r._writableState.shift())}if((r._duplexState&fe)!==0)return t(null);r._writev(n,t)}update(){const e=this.stream;e._duplexState|=C;do{while((e._duplexState&Te)===K){const t=this.shift();e._duplexState|=Ie;e._write(t,this.afterWrite)}if((e._duplexState&Pe)===0)this.updateNonPrimary()}while(this.continueUpdate()===true);e._duplexState&=se}updateNonPrimary(){const e=this.stream;if((e._duplexState&Oe)===Z){e._duplexState=(e._duplexState|H)&te;e._final(afterFinal.bind(this));return}if((e._duplexState&le)===h){if((e._duplexState&de)===0){e._duplexState|=ae;e._destroy(afterDestroy.bind(this))}return}if((e._duplexState&_e)===l){e._duplexState=(e._duplexState|ae)&p;e._open(afterOpen.bind(this))}}continueUpdate(){if((this.stream._duplexState&X)===0)return false;this.stream._duplexState&=ie;return true}updateCallback(){if((this.stream._duplexState&Fe)===G)this.update();else this.updateNextTick()}updateNextTick(){if((this.stream._duplexState&X)!==0)return;this.stream._duplexState|=X;if((this.stream._duplexState&C)===0)a(this.afterUpdateNextTick)}}class ReadableState{constructor(e,{highWaterMark:t=16384,map:n=null,mapReadable:r,byteLength:i,byteLengthReadable:s}={}){this.stream=e;this.queue=new o;this.highWaterMark=t;this.buffered=0;this.error=null;this.pipeline=null;this.byteLength=s||i||defaultByteLength;this.map=r||n;this.pipeTo=null;this.afterRead=afterRead.bind(this);this.afterUpdateNextTick=updateReadNT.bind(this)}get ended(){return(this.stream._duplexState&E)!==0}pipe(e,t){if(this.pipeTo!==null)throw new Error("Can only pipe to one destination");if(typeof t!=="function")t=null;this.stream._duplexState|=w;this.pipeTo=e;this.pipeline=new Pipeline(this.stream,e,t);if(t)this.stream.on("error",noop);if(isStreamx(e)){e._writableState.pipeline=this.pipeline;if(t)e.on("error",noop);e.on("finish",this.pipeline.finished.bind(this.pipeline))}else{const t=this.pipeline.done.bind(this.pipeline,e);const n=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",t);e.on("close",n);e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",afterDrain.bind(this));this.stream.emit("piping",e);e.emit("pipe",this.stream)}push(e){const t=this.stream;if(e===null){this.highWaterMark=0;t._duplexState=(t._duplexState|g)&q;return false}if(this.map!==null)e=this.map(e);this.buffered+=this.byteLength(e);this.queue.push(e);t._duplexState=(t._duplexState|S)&W;return this.buffered<this.highWaterMark}shift(){const e=this.queue.shift();this.buffered-=this.byteLength(e);if(this.buffered===0)this.stream._duplexState&=D;return e}unshift(e){const t=[this.map!==null?this.map(e):e];while(this.buffered>0)t.push(this.shift());for(let e=0;e<t.length-1;e++){const n=t[e];this.buffered+=this.byteLength(n);this.queue.push(n)}this.push(t[t.length-1])}read(){const e=this.stream;if((e._duplexState&be)===S){const t=this.shift();if(this.pipeTo!==null&&this.pipeTo.write(t)===false)e._duplexState&=j;if((e._duplexState&k)!==0)e.emit("data",t);return t}return null}drain(){const e=this.stream;while((e._duplexState&be)===S&&(e._duplexState&I)!==0){const t=this.shift();if(this.pipeTo!==null&&this.pipeTo.write(t)===false)e._duplexState&=j;if((e._duplexState&k)!==0)e.emit("data",t)}}update(){const e=this.stream;e._duplexState|=b;do{this.drain();while(this.buffered<this.highWaterMark&&(e._duplexState&xe)===0){e._duplexState|=O;e._read(this.afterRead);this.drain()}if((e._duplexState&Se)===F){e._duplexState|=L;e.emit("readable")}if((e._duplexState&B)===0)this.updateNonPrimary()}while(this.continueUpdate()===true);e._duplexState&=M}updateNonPrimary(){const e=this.stream;if((e._duplexState&ye)===g){e._duplexState=(e._duplexState|E)&R;e.emit("end");if((e._duplexState&ce)===ue)e._duplexState|=h;if(this.pipeTo!==null)this.pipeTo.end()}if((e._duplexState&le)===h){if((e._duplexState&de)===0){e._duplexState|=ae;e._destroy(afterDestroy.bind(this))}return}if((e._duplexState&_e)===l){e._duplexState=(e._duplexState|ae)&p;e._open(afterOpen.bind(this))}}continueUpdate(){if((this.stream._duplexState&T)===0)return false;this.stream._duplexState&=A;return true}updateCallback(){if((this.stream._duplexState&ge)===y)this.update();else this.updateNextTick()}updateNextTick(){if((this.stream._duplexState&T)!==0)return;this.stream._duplexState|=T;if((this.stream._duplexState&b)===0)a(this.afterUpdateNextTick)}}class TransformState{constructor(e){this.data=null;this.afterTransform=afterTransform.bind(e);this.afterFinal=null}}class Pipeline{constructor(e,t,n){this.from=e;this.to=t;this.afterPipe=n;this.error=null;this.pipeToFinished=false}finished(){this.pipeToFinished=true}done(e,t){if(t)this.error=t;if(e===this.to){this.to=null;if(this.from!==null){if((this.from._duplexState&E)===0||!this.pipeToFinished){this.from.destroy(this.error||new Error("Writable stream closed prematurely"))}return}}if(e===this.from){this.from=null;if(this.to!==null){if((e._duplexState&E)===0){this.to.destroy(this.error||new Error("Readable stream closed before ending"))}return}}if(this.afterPipe!==null)this.afterPipe(this.error);this.to=this.from=this.afterPipe=null}}function afterDrain(){this.stream._duplexState|=w;this.updateCallback()}function afterFinal(e){const t=this.stream;if(e)t.destroy(e);if((t._duplexState&le)===0){t._duplexState|=J;t.emit("finish")}if((t._duplexState&ce)===ue){t._duplexState|=h}t._duplexState&=$;if((t._duplexState&C)===0)this.update();else this.updateNextTick()}function afterDestroy(e){const t=this.stream;if(!e&&this.error!==i)e=this.error;if(e)t.emit("error",e);t._duplexState|=d;t.emit("close");const n=t._readableState;const r=t._writableState;if(n!==null&&n.pipeline!==null)n.pipeline.done(t,e);if(r!==null){while(r.drains!==null&&r.drains.length>0)r.drains.shift().resolve(false);if(r.pipeline!==null)r.pipeline.done(t,e)}}function afterWrite(e){const t=this.stream;if(e)t.destroy(e);t._duplexState&=$;if(this.drains!==null)tickDrains(this.drains);if((t._duplexState&Ee)===V){t._duplexState&=ne;if((t._duplexState&Q)===Q){t.emit("drain")}}this.updateCallback()}function afterRead(e){if(e)this.stream.destroy(e);this.stream._duplexState&=z;this.updateCallback()}function updateReadNT(){if((this.stream._duplexState&b)===0){this.stream._duplexState&=A;this.update()}}function updateWriteNT(){if((this.stream._duplexState&C)===0){this.stream._duplexState&=ie;this.update()}}function tickDrains(e){for(let t=0;t<e.length;t++){if(--e[t].writes===0){e.shift().resolve(true);t--}}}function afterOpen(e){const t=this.stream;if(e)t.destroy(e);if((t._duplexState&h)===0){if((t._duplexState&me)===0)t._duplexState|=y;if((t._duplexState&ke)===0)t._duplexState|=G;t.emit("open")}t._duplexState&=oe;if(t._writableState!==null){t._writableState.updateCallback()}if(t._readableState!==null){t._readableState.updateCallback()}}function afterTransform(e,t){if(t!==undefined&&t!==null)this.push(t);this._writableState.afterWrite(e)}class Stream extends r{constructor(e){super();this._duplexState=0;this._readableState=null;this._writableState=null;if(e){if(e.open)this._open=e.open;if(e.destroy)this._destroy=e.destroy;if(e.predestroy)this._predestroy=e.predestroy;if(e.signal){e.signal.addEventListener("abort",abort.bind(this))}}}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState!==null?true:undefined}get writable(){return this._writableState!==null?true:undefined}get destroyed(){return(this._duplexState&d)!==0}get destroying(){return(this._duplexState&le)!==0}destroy(e){if((this._duplexState&le)===0){if(!e)e=i;this._duplexState=(this._duplexState|h)&he;if(this._readableState!==null){this._readableState.highWaterMark=0;this._readableState.error=e}if(this._writableState!==null){this._writableState.highWaterMark=0;this._writableState.error=e}this._duplexState|=c;this._predestroy();this._duplexState&=_;if(this._readableState!==null)this._readableState.updateNextTick();if(this._writableState!==null)this._writableState.updateNextTick()}}on(e,t){if(this._readableState!==null){if(e==="data"){this._duplexState|=k|x;this._readableState.updateNextTick()}if(e==="readable"){this._duplexState|=v;this._readableState.updateNextTick()}}if(this._writableState!==null){if(e==="drain"){this._duplexState|=Q;this._writableState.updateNextTick()}}return super.on(e,t)}}class Readable extends Stream{constructor(e){super(e);this._duplexState|=l|J;this._readableState=new ReadableState(this,e);if(e){if(e.read)this._read=e.read;if(e.eagerOpen)this._readableState.updateNextTick()}}_read(e){e(null)}pipe(e,t){this._readableState.updateNextTick();this._readableState.pipe(e,t);return e}read(){this._readableState.updateNextTick();return this._readableState.read()}push(e){this._readableState.updateNextTick();return this._readableState.push(e)}unshift(e){this._readableState.updateNextTick();return this._readableState.unshift(e)}resume(){this._duplexState|=x;this._readableState.updateNextTick();return this}pause(){this._duplexState&=U;return this}static _fromAsyncIterator(e,t){let n;const r=new Readable({...t,read(t){e.next().then(push).then(t.bind(null,null)).catch(t)},predestroy(){n=e.return()},destroy(e){if(!n)return e(null);n.then(e.bind(null,null)).catch(e)}});return r;function push(e){if(e.done)r.push(null);else r.push(e.value)}}static from(e,t){if(isReadStreamx(e))return e;if(e[ze])return this._fromAsyncIterator(e[ze](),t);if(!Array.isArray(e))e=e===undefined?[]:[e];let n=0;return new Readable({...t,read(t){this.push(n===e.length?null:e[n++]);t(null)}})}static isBackpressured(e){return(e._duplexState&we)!==0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&x)===0}[ze](){const e=this;let t=null;let n=null;let r=null;this.on("error",(e=>{t=e}));this.on("readable",onreadable);this.on("close",onclose);return{[ze](){return this},next(){return new Promise((function(t,i){n=t;r=i;const s=e.read();if(s!==null)ondata(s);else if((e._duplexState&d)!==0)ondata(null)}))},return(){return destroy(null)},throw(e){return destroy(e)}};function onreadable(){if(n!==null)ondata(e.read())}function onclose(){if(n!==null)ondata(null)}function ondata(s){if(r===null)return;if(t)r(t);else if(s===null&&(e._duplexState&E)===0)r(i);else n({value:s,done:s===null});r=n=null}function destroy(t){e.destroy(t);return new Promise(((n,r)=>{if(e._duplexState&d)return n({value:undefined,done:true});e.once("close",(function(){if(t)r(t);else n({value:undefined,done:true})}))}))}}}class Writable extends Stream{constructor(e){super(e);this._duplexState|=l|E;this._writableState=new WritableState(this,e);if(e){if(e.writev)this._writev=e.writev;if(e.write)this._write=e.write;if(e.final)this._final=e.final;if(e.eagerOpen)this._writableState.updateNextTick()}}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&Be)!==0}static drained(e){if(e.destroyed)return Promise.resolve(false);const t=e._writableState;const n=t.queue.length+(e._duplexState&Y?1:0);if(n===0)return Promise.resolve(true);if(t.drains===null)t.drains=[];return new Promise((e=>{t.drains.push({writes:n,resolve:e})}))}write(e){this._writableState.updateNextTick();return this._writableState.push(e)}end(e){this._writableState.updateNextTick();this._writableState.end(e);return this}}class Duplex extends Readable{constructor(e){super(e);this._duplexState=l;this._writableState=new WritableState(this,e);if(e){if(e.writev)this._writev=e.writev;if(e.write)this._write=e.write;if(e.final)this._final=e.final}}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}write(e){this._writableState.updateNextTick();return this._writableState.push(e)}end(e){this._writableState.updateNextTick();this._writableState.end(e);return this}}class Transform extends Duplex{constructor(e){super(e);this._transformState=new TransformState(this);if(e){if(e.transform)this._transform=e.transform;if(e.flush)this._flush=e.flush}}_write(e,t){if(this._readableState.buffered>=this._readableState.highWaterMark){this._transformState.data=e}else{this._transform(e,this._transformState.afterTransform)}}_read(e){if(this._transformState.data!==null){const t=this._transformState.data;this._transformState.data=null;e(null);this._transform(t,this._transformState.afterTransform)}else{e(null)}}_transform(e,t){t(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e;this._flush(transformAfterFlush.bind(this))}}class PassThrough extends Transform{}function transformAfterFlush(e,t){const n=this._transformState.afterFinal;if(e)return n(e);if(t!==null&&t!==undefined)this.push(t);this.push(null);n(null)}function pipelinePromise(...e){return new Promise(((t,n)=>pipeline(...e,(e=>{if(e)return n(e);t()}))))}function pipeline(e,...t){const n=Array.isArray(e)?[...e,...t]:[e,...t];const r=n.length&&typeof n[n.length-1]==="function"?n.pop():null;if(n.length<2)throw new Error("Pipeline requires at least 2 streams");let i=n[0];let a=null;let o=null;for(let e=1;e<n.length;e++){a=n[e];if(isStreamx(i)){i.pipe(a,onerror)}else{errorHandle(i,true,e>1,onerror);i.pipe(a)}i=a}if(r){let e=false;const t=isStreamx(a)||!!(a._writableState&&a._writableState.autoDestroy);a.on("error",(e=>{if(o===null)o=e}));a.on("finish",(()=>{e=true;if(!t)r(o)}));if(t){a.on("close",(()=>r(o||(e?null:s))))}}return a;function errorHandle(e,t,n,r){e.on("error",r);e.on("close",onclose);function onclose(){if(t&&e._readableState&&!e._readableState.ended)return r(s);if(n&&e._writableState&&!e._writableState.ended)return r(s)}}function onerror(e){if(!e||o)return;o=e;for(const t of n){t.destroy(e)}}}function isStream(e){return!!e._readableState||!!e._writableState}function isStreamx(e){return typeof e._duplexState==="number"&&isStream(e)}function getStreamError(e){const t=e._readableState&&e._readableState.error||e._writableState&&e._writableState.error;return t===i?null:t}function isReadStreamx(e){return isStreamx(e)&&e.readable}function isTypedArray(e){return typeof e==="object"&&e!==null&&typeof e.byteLength==="number"}function defaultByteLength(e){return isTypedArray(e)?e.byteLength:1024}function noop(){}function abort(){this.destroy(new Error("Stream aborted."))}e.exports={pipeline:pipeline,pipelinePromise:pipelinePromise,isStream:isStream,isStreamx:isStreamx,getStreamError:getStreamError,Stream:Stream,Writable:Writable,Readable:Readable,Duplex:Duplex,Transform:Transform,PassThrough:PassThrough}},220:(e,t,n)=>{const r={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{e.exports=n(358).constants||r}catch{e.exports=r}},545:(e,t,n)=>{const{Writable:r,Readable:i,getStreamError:s}=n(147);const a=n(958);const o=n(497);const u=n(834);const l=o.alloc(0);class BufferList{constructor(){this.buffered=0;this.shifted=0;this.queue=new a;this._offset=0}push(e){this.buffered+=e.byteLength;this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return l;let t=this._next(e);if(e===t.byteLength)return t;const n=[t];while((e-=t.byteLength)>0){t=this._next(e);n.push(t)}return o.concat(n)}_next(e){const t=this.queue.peek();const n=t.byteLength-this._offset;if(e>=n){const e=this._offset?t.subarray(this._offset,t.byteLength):t;this.queue.shift();this._offset=0;this.buffered-=n;this.shifted+=n;return e}this.buffered-=e;this.shifted+=e;return t.subarray(this._offset,this._offset+=e)}}class Source extends i{constructor(e,t,n){super();this.header=t;this.offset=n;this._parent=e}_read(e){if(this.header.size===0){this.push(null)}if(this._parent._stream===this){this._parent._update()}e(null)}_predestroy(){this._parent.destroy(s(this))}_detach(){if(this._parent._stream===this){this._parent._stream=null;this._parent._missing=overflow(this.header.size);this._parent._update()}}_destroy(e){this._detach();e(null)}}class Extract extends r{constructor(e){super(e);if(!e)e={};this._buffer=new BufferList;this._offset=0;this._header=null;this._stream=null;this._missing=0;this._longHeader=false;this._callback=noop;this._locked=false;this._finished=false;this._pax=null;this._paxGlobal=null;this._gnuLongPath=null;this._gnuLongLinkPath=null;this._filenameEncoding=e.filenameEncoding||"utf-8";this._allowUnknownFormat=!!e.allowUnknownFormat;this._unlockBound=this._unlock.bind(this)}_unlock(e){this._locked=false;if(e){this.destroy(e);this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return false;this._offset=this._buffer.shifted;try{this._header=u.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){this._continueWrite(e);return false}if(!this._header)return true;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":this._longHeader=true;this._missing=this._header.size;return true}this._locked=true;this._applyLongHeaders();if(this._header.size===0||this._header.type==="directory"){this.emit("entry",this._header,this._createStream(),this._unlockBound);return true}this._stream=this._createStream();this._missing=this._header.size;this.emit("entry",this._header,this._stream,this._unlockBound);return true}_applyLongHeaders(){if(this._gnuLongPath){this._header.name=this._gnuLongPath;this._gnuLongPath=null}if(this._gnuLongLinkPath){this._header.linkname=this._gnuLongLinkPath;this._gnuLongLinkPath=null}if(this._pax){if(this._pax.path)this._header.name=this._pax.path;if(this._pax.linkpath)this._header.linkname=this._pax.linkpath;if(this._pax.size)this._header.size=parseInt(this._pax.size,10);this._header.pax=this._pax;this._pax=null}}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=u.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=u.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=u.decodePax(e);break;case"pax-header":this._pax=this._paxGlobal===null?u.decodePax(e):Object.assign({},this._paxGlobal,u.decodePax(e));break}}_consumeLongHeader(){this._longHeader=false;this._missing=overflow(this._header.size);const e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(e){this._continueWrite(e);return false}return true}_consumeStream(){const e=this._buffer.shiftFirst(this._missing);if(e===null)return false;this._missing-=e.byteLength;const t=this._stream.push(e);if(this._missing===0){this._stream.push(null);if(t)this._stream._detach();return t&&this._locked===false}return t}_createStream(){return new Source(this,this._header,this._offset)}_update(){while(this._buffer.buffered>0&&!this.destroying){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===false)return;continue}if(this._longHeader===true){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===false)return false;continue}const e=this._buffer.shiftFirst(this._missing);if(e!==null)this._missing-=e.byteLength;continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===false)return}this._continueWrite(null)}_continueWrite(e){const t=this._callback;this._callback=noop;t(e)}_write(e,t){this._callback=t;this._buffer.push(e);this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0;e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){if(this._stream)this._stream.destroy(s(this));e(null)}[Symbol.asyncIterator](){let e=null;let t=null;let n=null;let r=null;let i=null;const s=this;this.on("entry",onentry);this.on("error",(t=>{e=t}));this.on("close",onclose);return{[Symbol.asyncIterator](){return this},next(){return new Promise(onnext)},return(){return destroy(null)},throw(e){return destroy(e)}};function consumeCallback(e){if(!i)return;const t=i;i=null;t(e)}function onnext(i,a){if(e){return a(e)}if(r){i({value:r,done:false});r=null;return}t=i;n=a;consumeCallback(null);if(s._finished&&t){t({value:undefined,done:true});t=n=null}}function onentry(e,s,a){i=a;s.on("error",noop);if(t){t({value:s,done:false});t=n=null}else{r=s}}function onclose(){consumeCallback(e);if(!t)return;if(e)n(e);else t({value:undefined,done:true});t=n=null}function destroy(e){s.destroy(e);consumeCallback(e);return new Promise(((t,n)=>{if(s.destroyed)return t({value:undefined,done:true});s.once("close",(function(){if(e)n(e);else t({value:undefined,done:true})}))}))}}}e.exports=function extract(e){return new Extract(e)};function noop(){}function overflow(e){e&=511;return e&&512-e}},834:(e,t,n)=>{const r=n(497);const i="0000000000000000000";const s="7777777777777777777";const a="0".charCodeAt(0);const o=r.from([117,115,116,97,114,0]);const u=r.from([a,a]);const l=r.from([117,115,116,97,114,32]);const c=r.from([32,0]);const h=4095;const d=257;const p=263;t.decodeLongPath=function decodeLongPath(e,t){return decodeStr(e,0,e.length,t)};t.encodePax=function encodePax(e){let t="";if(e.name)t+=addLength(" path="+e.name+"\n");if(e.linkname)t+=addLength(" linkpath="+e.linkname+"\n");const n=e.pax;if(n){for(const e in n){t+=addLength(" "+e+"="+n[e]+"\n")}}return r.from(t)};t.decodePax=function decodePax(e){const t={};while(e.length){let n=0;while(n<e.length&&e[n]!==32)n++;const i=parseInt(e.subarray(0,n).toString(),10);if(!i)return t;const s=r.toString(e.subarray(n+1,i-1));const a=s.indexOf("=");if(a===-1)return t;t[s.slice(0,a)]=s.slice(a+1);e=e.subarray(i)}return t};t.encode=function encode(e){const t=r.alloc(512);let n=e.name;let i="";if(e.typeflag===5&&n[n.length-1]!=="/")n+="/";if(r.byteLength(n)!==n.length)return null;while(r.byteLength(n)>100){const e=n.indexOf("/");if(e===-1)return null;i+=i?"/"+n.slice(0,e):n.slice(0,e);n=n.slice(e+1)}if(r.byteLength(n)>100||r.byteLength(i)>155)return null;if(e.linkname&&r.byteLength(e.linkname)>100)return null;r.write(t,n);r.write(t,encodeOct(e.mode&h,6),100);r.write(t,encodeOct(e.uid,6),108);r.write(t,encodeOct(e.gid,6),116);encodeSize(e.size,t,124);r.write(t,encodeOct(e.mtime.getTime()/1e3|0,11),136);t[156]=a+toTypeflag(e.type);if(e.linkname)r.write(t,e.linkname,157);r.copy(o,t,d);r.copy(u,t,p);if(e.uname)r.write(t,e.uname,265);if(e.gname)r.write(t,e.gname,297);r.write(t,encodeOct(e.devmajor||0,6),329);r.write(t,encodeOct(e.devminor||0,6),337);if(i)r.write(t,i,345);r.write(t,encodeOct(cksum(t),6),148);return t};t.decode=function decode(e,t,n){let r=e[156]===0?0:e[156]-a;let i=decodeStr(e,0,100,t);const s=decodeOct(e,100,8);const o=decodeOct(e,108,8);const u=decodeOct(e,116,8);const l=decodeOct(e,124,12);const c=decodeOct(e,136,12);const h=toType(r);const d=e[157]===0?null:decodeStr(e,157,100,t);const p=decodeStr(e,265,32);const _=decodeStr(e,297,32);const m=decodeOct(e,329,8);const b=decodeOct(e,337,8);const y=cksum(e);if(y===8*32)return null;if(y!==decodeOct(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(isUSTAR(e)){if(e[345])i=decodeStr(e,345,155,t)+"/"+i}else if(isGNU(e)){}else{if(!n){throw new Error("Invalid tar header: unknown format.")}}if(r===0&&i&&i[i.length-1]==="/")r=5;return{name:i,mode:s,uid:o,gid:u,size:l,mtime:new Date(1e3*c),type:h,linkname:d,uname:p,gname:_,devmajor:m,devminor:b,pax:null}};function isUSTAR(e){return r.equals(o,e.subarray(d,d+6))}function isGNU(e){return r.equals(l,e.subarray(d,d+6))&&r.equals(c,e.subarray(p,p+2))}function clamp(e,t,n){if(typeof e!=="number")return n;e=~~e;if(e>=t)return t;if(e>=0)return e;e+=t;if(e>=0)return e;return 0}function toType(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function toTypeflag(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function indexOf(e,t,n,r){for(;n<r;n++){if(e[n]===t)return n}return r}function cksum(e){let t=8*32;for(let n=0;n<148;n++)t+=e[n];for(let n=156;n<512;n++)t+=e[n];return t}function encodeOct(e,t){e=e.toString(8);if(e.length>t)return s.slice(0,t)+" ";return i.slice(0,t-e.length)+e+" "}function encodeSizeBin(e,t,n){t[n]=128;for(let r=11;r>0;r--){t[n+r]=e&255;e=Math.floor(e/256)}}function encodeSize(e,t,n){if(e.toString(8).length>11){encodeSizeBin(e,t,n)}else{r.write(t,encodeOct(e,11),n)}}function parse256(e){let t;if(e[0]===128)t=true;else if(e[0]===255)t=false;else return null;const n=[];let r;for(r=e.length-1;r>0;r--){const i=e[r];if(t)n.push(i);else n.push(255-i)}let i=0;const s=n.length;for(r=0;r<s;r++){i+=n[r]*Math.pow(256,r)}return t?i:-1*i}function decodeOct(e,t,n){e=e.subarray(t,t+n);t=0;if(e[t]&128){return parse256(e)}else{while(t<e.length&&e[t]===32)t++;const n=clamp(indexOf(e,32,t,e.length),e.length,e.length);while(t<n&&e[t]===0)t++;if(n===t)return 0;return parseInt(e.subarray(t,n).toString(),8)}}function decodeStr(e,t,n,i){return r.toString(e.subarray(t,indexOf(e,0,t,t+n)),i)}function addLength(e){const t=r.byteLength(e);let n=Math.floor(Math.log(t)/Math.log(10))+1;if(t+n>=Math.pow(10,n))n++;return t+n+e}},260:(e,t,n)=>{t.extract=n(545);t.pack=n(456)},456:(e,t,n)=>{const{Readable:r,Writable:i,getStreamError:s}=n(147);const a=n(497);const o=n(220);const u=n(834);const l=493;const c=420;const h=a.alloc(1024);class Sink extends i{constructor(e,t,n){super({mapWritable:mapWritable,eagerOpen:true});this.written=0;this.header=t;this._callback=n;this._linkname=null;this._isLinkname=t.type==="symlink"&&!t.linkname;this._isVoid=t.type!=="file"&&t.type!=="contiguous-file";this._finished=false;this._pack=e;this._openCallback=null;if(this._pack._stream===null)this._pack._stream=this;else this._pack._pending.push(this)}_open(e){this._openCallback=e;if(this._pack._stream===this)this._continueOpen()}_continuePack(e){if(this._callback===null)return;const t=this._callback;this._callback=null;t(e)}_continueOpen(){if(this._pack._stream===null)this._pack._stream=this;const e=this._openCallback;this._openCallback=null;if(e===null)return;if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this;if(!this._isLinkname){this._pack._encode(this.header)}if(this._isVoid){this._finish();this._continuePack(null)}e(null)}_write(e,t){if(this._isLinkname){this._linkname=this._linkname?a.concat([this._linkname,e]):e;return t(null)}if(this._isVoid){if(e.byteLength>0){return t(new Error("No body allowed for this entry"))}return t()}this.written+=e.byteLength;if(this._pack.push(e))return t();this._pack._drain=t}_finish(){if(this._finished)return;this._finished=true;if(this._isLinkname){this.header.linkname=this._linkname?a.toString(this._linkname,"utf-8"):"";this._pack._encode(this.header)}overflow(this._pack,this.header.size);this._pack._done(this)}_final(e){if(this.written!==this.header.size){return e(new Error("Size mismatch"))}this._finish();e(null)}_getError(){return s(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this);this._continuePack(this._finished?null:this._getError());e()}}class Pack extends r{constructor(e){super(e);this._drain=noop;this._finalized=false;this._finalizing=false;this._pending=[];this._stream=null}entry(e,t,n){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");if(typeof t==="function"){n=t;t=null}if(!n)n=noop;if(!e.size||e.type==="symlink")e.size=0;if(!e.type)e.type=modeToType(e.mode);if(!e.mode)e.mode=e.type==="directory"?l:c;if(!e.uid)e.uid=0;if(!e.gid)e.gid=0;if(!e.mtime)e.mtime=new Date;if(typeof t==="string")t=a.from(t);const r=new Sink(this,e,n);if(a.isBuffer(t)){e.size=t.byteLength;r.write(t);r.end();return r}if(r._isVoid){return r}return r}finalize(){if(this._stream||this._pending.length>0){this._finalizing=true;return}if(this._finalized)return;this._finalized=true;this.push(h);this.push(null)}_done(e){if(e!==this._stream)return;this._stream=null;if(this._finalizing)this.finalize();if(this._pending.length)this._pending.shift()._continueOpen()}_encode(e){if(!e.pax){const t=u.encode(e);if(t){this.push(t);return}}this._encodePax(e)}_encodePax(e){const t=u.encodePax({name:e.name,linkname:e.linkname,pax:e.pax});const n={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(u.encode(n));this.push(t);overflow(this,t.byteLength);n.size=e.size;n.type=e.type;this.push(u.encode(n))}_doDrain(){const e=this._drain;this._drain=noop;e()}_predestroy(){const e=s(this);if(this._stream)this._stream.destroy(e);while(this._pending.length){const t=this._pending.shift();t.destroy(e);t._continueOpen()}this._doDrain()}_read(e){this._doDrain();e()}}e.exports=function pack(e){return new Pack(e)};function modeToType(e){switch(e&o.S_IFMT){case o.S_IFBLK:return"block-device";case o.S_IFCHR:return"character-device";case o.S_IFDIR:return"directory";case o.S_IFIFO:return"fifo";case o.S_IFLNK:return"symlink"}return"file"}function noop(){}function overflow(e,t){t&=511;if(t)e.push(h.subarray(0,512-t))}function mapWritable(e){return a.isBuffer(e)?e:a.from(e)}},940:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var n=0;n<t.length;n++){t[n]=arguments[n]}var r=e.apply(this,t);var i=t[t.length-1];if(typeof r==="function"&&r!==i){Object.keys(i).forEach((function(e){r[e]=i[e]}))}return r}}},361:e=>{"use strict";e.exports=require("events")},358:e=>{"use strict";e.exports=require("fs")},17:e=>{"use strict";e.exports=require("path")}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{var e=n;const t=__nccwpck_require__(260);const r=__nccwpck_require__(341);const i=__nccwpck_require__(614);const s=__nccwpck_require__(358);const a=__nccwpck_require__(17);const o=process.platform==="win32";e.pack=function pack(e,n){if(!e)e=".";if(!n)n={};const i=n.fs||s;const o=n.ignore||n.filter||noop;const u=n.mapStream||echo;const l=statAll(i,n.dereference?i.stat:i.lstat,e,o,n.entries,n.sort);const c=n.strict!==false;const h=typeof n.umask==="number"?~n.umask:~processUmask();const pack=n.pack||t.pack();const d=n.finish||noop;let p=n.map||noop;let _=typeof n.dmode==="number"?n.dmode:0;let m=typeof n.fmode==="number"?n.fmode:0;if(n.strip)p=strip(p,n.strip);if(n.readable){_|=parseInt(555,8);m|=parseInt(444,8)}if(n.writable){_|=parseInt(333,8);m|=parseInt(222,8)}onnextentry();function onsymlink(t,n){i.readlink(a.join(e,t),(function(e,t){if(e)return pack.destroy(e);n.linkname=normalize(t);pack.entry(n,onnextentry)}))}function onstat(t,s,o){if(t)return pack.destroy(t);if(!s){if(n.finalize!==false)pack.finalize();return d(pack)}if(o.isSocket())return onnextentry();let l={name:normalize(s),mode:(o.mode|(o.isDirectory()?_:m))&h,mtime:o.mtime,size:o.size,type:"file",uid:o.uid,gid:o.gid};if(o.isDirectory()){l.size=0;l.type="directory";l=p(l)||l;return pack.entry(l,onnextentry)}if(o.isSymbolicLink()){l.size=0;l.type="symlink";l=p(l)||l;return onsymlink(s,l)}l=p(l)||l;if(!o.isFile()){if(c)return pack.destroy(new Error("unsupported type for "+s));return onnextentry()}const b=pack.entry(l,onnextentry);const y=u(i.createReadStream(a.join(e,s),{start:0,end:l.size>0?l.size-1:l.size}),l);y.on("error",(function(e){b.destroy(e)}));r(y,b)}function onnextentry(e){if(e)return pack.destroy(e);l(onstat)}return pack};function head(e){return e.length?e[e.length-1]:null}function processGetuid(){return process.getuid?process.getuid():-1}function processUmask(){return process.umask?process.umask():0}e.extract=function extract(e,n){if(!e)e=".";if(!n)n={};const u=n.fs||s;const l=n.ignore||n.filter||noop;const c=n.mapStream||echo;const h=n.chown!==false&&!o&&processGetuid()===0;const extract=n.extract||t.extract();const d=[];const p=new Date;const _=typeof n.umask==="number"?~n.umask:~processUmask();const m=n.strict!==false;let b=n.map||noop;let y=typeof n.dmode==="number"?n.dmode:0;let S=typeof n.fmode==="number"?n.fmode:0;if(n.strip)b=strip(b,n.strip);if(n.readable){y|=parseInt(555,8);S|=parseInt(444,8)}if(n.writable){y|=parseInt(333,8);S|=parseInt(222,8)}extract.on("entry",onentry);if(n.finish)extract.on("finish",n.finish);return extract;function onentry(t,i,s){t=b(t)||t;t.name=normalize(t.name);const p=a.join(e,a.join("/",t.name));if(l(p,t)){i.resume();return s()}if(t.type==="directory"){d.push([p,t.mtime]);return mkdirfix(p,{fs:u,own:h,uid:t.uid,gid:t.gid,mode:t.mode},stat)}const _=a.dirname(p);validate(u,_,a.join(e,"."),(function(e,n){if(e)return s(e);if(!n)return s(new Error(_+" is not a valid path"));mkdirfix(_,{fs:u,own:h,uid:t.uid,gid:t.gid,mode:493},(function(e){if(e)return s(e);switch(t.type){case"file":return onfile();case"link":return onlink();case"symlink":return onsymlink()}if(m)return s(new Error("unsupported type for "+p+" ("+t.type+")"));i.resume();s()}))}));function stat(e){if(e)return s(e);utimes(p,t,(function(e){if(e)return s(e);if(o)return s();chperm(p,t,s)}))}function onsymlink(){if(o)return s();u.unlink(p,(function(){u.symlink(t.linkname,p,stat)}))}function onlink(){if(o)return s();u.unlink(p,(function(){const r=a.join(e,a.join("/",t.linkname));u.link(r,p,(function(e){if(e&&e.code==="EPERM"&&n.hardlinkAsFilesFallback){i=u.createReadStream(r);return onfile()}stat(e)}))}))}function onfile(){const e=u.createWriteStream(p);const n=c(i,t);e.on("error",(function(e){n.destroy(e)}));r(n,e,(function(t){if(t)return s(t);e.on("close",stat)}))}}function utimesParent(e,t){let n;while((n=head(d))&&e.slice(0,n[0].length)!==n[0])d.pop();if(!n)return t();u.utimes(n[0],p,n[1],t)}function utimes(e,t,r){if(n.utimes===false)return r();if(t.type==="directory")return u.utimes(e,p,t.mtime,r);if(t.type==="symlink")return utimesParent(e,r);u.utimes(e,p,t.mtime,(function(t){if(t)return r(t);utimesParent(e,r)}))}function chperm(e,t,n){const r=t.type==="symlink";const i=r?u.lchmod:u.chmod;const s=r?u.lchown:u.chown;if(!i)return n();const a=(t.mode|(t.type==="directory"?y:S))&_;if(s&&h)s.call(u,e,t.uid,t.gid,onchown);else onchown(null);function onchown(t){if(t)return n(t);if(!i)return n();i.call(u,e,a,n)}}function mkdirfix(e,t,n){u.stat(e,(function(r){if(!r)return n(null);if(r.code!=="ENOENT")return n(r);i(e,{fs:t.fs,mode:t.mode},(function(r,i){if(r)return n(r);chperm(e,t,n)}))}))}};function validate(e,t,n,r){if(t===n)return r(null,true);e.lstat(t,(function(i,s){if(i&&i.code==="ENOENT")return validate(e,a.join(t,".."),n,r);else if(i)return r(i);r(null,s.isDirectory())}))}function noop(){}function echo(e){return e}function normalize(e){return o?e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_"):e}function statAll(e,t,n,r,i,s){if(!i)i=["."];const o=i.slice(0);return function loop(u){if(!o.length)return u(null);const l=o.shift();const c=a.join(n,l);t.call(e,c,(function(t,h){if(t)return u(i.indexOf(l)===-1&&t.code==="ENOENT"?null:t);if(!h.isDirectory())return u(null,l,h);e.readdir(c,(function(e,t){if(e)return u(e);if(s)t.sort();for(let e=0;e<t.length;e++){if(!r(a.join(n,l,t[e])))o.push(a.join(l,t[e]))}u(null,l,h)}))}))}}function strip(e,t){return function(n){n.name=n.name.split("/").slice(t).join("/");const r=n.linkname;if(r&&(n.type==="link"||a.isAbsolute(r))){n.linkname=r.split("/").slice(t).join("/")}return e(n)}}})();module.exports=n})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"tar-fs","version":"3.0.4","description":"filesystem bindings for tar-stream","dependencies":{"mkdirp-classic":"^0.5.2","pump":"^3.0.0","tar-stream":"^3.1.5"},"files":["index.js"],"standard":{"ignore":["test/fixtures/**"]},"keywords":["tar","fs","file","tarball","directory","stream"],"devDependencies":{"brittle":"^3.1.3","rimraf":"^2.6.3","standard":"^17.0.1"},"scripts":{"test":"standard && brittle test/index.js"},"bugs":{"url":"https://github.com/mafintosh/tar-fs/issues"},"homepage":"https://github.com/mafintosh/tar-fs","main":"index.js","directories":{"test":"test"},"author":"Mathias Buus","license":"MIT","repository":{"type":"git","url":"https://github.com/mafintosh/tar-fs.git"},"_lastModified":"2026-
|
|
1
|
+
{"name":"tar-fs","version":"3.0.4","description":"filesystem bindings for tar-stream","dependencies":{"mkdirp-classic":"^0.5.2","pump":"^3.0.0","tar-stream":"^3.1.5"},"files":["index.js"],"standard":{"ignore":["test/fixtures/**"]},"keywords":["tar","fs","file","tarball","directory","stream"],"devDependencies":{"brittle":"^3.1.3","rimraf":"^2.6.3","standard":"^17.0.1"},"scripts":{"test":"standard && brittle test/index.js"},"bugs":{"url":"https://github.com/mafintosh/tar-fs/issues"},"homepage":"https://github.com/mafintosh/tar-fs","main":"index.js","directories":{"test":"test"},"author":"Mathias Buus","license":"MIT","repository":{"type":"git","url":"https://github.com/mafintosh/tar-fs.git"},"_lastModified":"2026-04-27T17:01:44.412Z"}
|
package/package.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"description": "Server-side logs, mainly including API request logs and system runtime logs, and allows to package and download log files.",
|
|
7
7
|
"description.ru-RU": "Серверные логи, включают журналы запросов API и системные журналы, с возможностью архивации и скачивания лог-файлов.",
|
|
8
8
|
"description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。",
|
|
9
|
-
"version": "2.1.0-beta.
|
|
10
|
-
"license": "
|
|
9
|
+
"version": "2.1.0-beta.21",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/logger",
|
|
13
13
|
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/logger",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@nocobase/server": "2.x",
|
|
23
23
|
"@nocobase/test": "2.x"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "324bd82f33fca58e98711688a17ceb65c186b65e",
|
|
26
26
|
"keywords": [
|
|
27
27
|
"Logging and monitoring"
|
|
28
28
|
]
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_logger=self.webpackChunk_nocobase_plugin_logger||[]).push([["726"],{117:function(e,t,r){r.r(t),r.d(t,{LogsDownloader:function(){return v}});var n=r(772),o=r(156),l=r.n(o),a=r(721),i=r(482),c=r(551),u=r(749);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function f(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var l=[],a=!0,i=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(l.push(r.value),!t||l.length!==t);a=!0);}catch(e){i=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(i)throw n}}return l}}(e,t)||m(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}}var h=a.Typography.Paragraph,g=a.Typography.Text,b=l().memo(function(){var e=(0,c.vP)().t;return l().createElement(a.Typography,null,l().createElement(h,null,l().createElement(g,{code:!0},"request_*.log")," - ",e("API request and response logs")),l().createElement(h,null,l().createElement(g,{code:!0},"system_*.log")," -"," ",e("Application, database, plugins and other system logs, the error level logs will be sent to")," ",l().createElement(g,{code:!0},"system_error_*.log")),l().createElement(h,null,l().createElement(g,{code:!0},"sql_*.log")," - ",e("SQL execution logs, printed by Sequelize when the db logging is enabled")))});b.displayName="Tips";var v=l().memo(function(e){var t=a.theme.useToken().token,r=(0,c.vP)().t,s=(0,u.useMemoizedFn)(r),m=(0,n.useAPIClient)(),h=y(l().useState(["0"]),2),g=h[0],v=h[1],E=y(l().useState(""),2),w=E[0],O=E[1],S=y(l().useState(!0),2),k=S[0],P=S[1],j=y(l().useState([]),2),A=j[0],x=j[1],T=(0,n.useRequest)(function(){return m.resource("logger").list().then(function(e){var t;return null==(t=e.data)?void 0:t.data})}).data,_=(0,o.useCallback)(function(e,t){return e.map(function(e,r){var n="".concat(t,"-").concat(r);return"string"==typeof e?{title:e,key:n,icon:l().createElement(i.FileOutlined,null)}:{title:e.name,key:n,icon:l().createElement(i.FolderOutlined,null),children:_(e.files,n)}})},[]),I=(0,o.useMemo)(function(){var e=T||[];return[{title:s("All"),key:"0",children:_(e,"0")}]},[T,_,s]),C=l().useMemo(function(){if(!w)return I;var e=function(r){var n=[],o=!0,a=!1,i=void 0;try{for(var c,u=r[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var s=c.value,y=s.title,d=y.indexOf(w),m=y.substring(0,d),h=y.substring(d+w.length),g=d>-1?l().createElement("span",null,m,l().createElement("span",{style:{color:t.colorPrimary}},w),h):l().createElement("span",null,y);if(d>-1)n.push(f(p({},s),{title:g}));else if(s.children){var b=e(s.children);b.length&&n.push(f(p({},s),{title:g,children:b}))}}}catch(e){a=!0,i=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw i}}return n};return e(I)},[w,I,t.colorPrimary]);return l().createElement(a.Card,{style:{minHeight:"700px"}},l().createElement(a.Alert,{message:"",description:l().createElement(b,null),type:"info",showIcon:!0}),l().createElement(a.Input.Search,{style:{marginTop:16,width:"450px"},placeholder:s("Search"),onChange:function(e){var t=e.target.value,r=function(e){return e.reduce(function(e,n){var o;return((null==(o=n.title)?void 0:o.includes(t))&&e.push(n),n.children)?d(e).concat(d(r(n.children))):e},[])};v(r(I).map(function(e){return e.key})),O(t),P(!0),x([])}}),l().createElement("div",{style:{maxHeight:"400px",width:"450px",overflow:"auto",border:"1px solid",marginTop:"6px",marginBottom:"10px",borderColor:t.colorBorder}},C.length?l().createElement(a.Tree,{checkable:!0,showIcon:!0,showLine:!0,checkedKeys:A,expandedKeys:g,autoExpandParent:k,onExpand:function(e){v(e),P(!1)},onCheck:function(e){return x(e)},treeData:C}):l().createElement(a.Empty,{image:a.Empty.PRESENTED_IMAGE_SIMPLE})),l().createElement(a.Button,{type:"primary",onClick:function(){var e=function(t,r){return t.reduce(function(t,n){var o=n.title;return(o="0"===n.key?o:"".concat(r,"/").concat(o),n.children)?d(t).concat(d(e(n.children,"0"===n.key?"":o))):(A.includes(n.key)&&"0"!==n.key&&t.push(o),t)},[])},t=e(I,"");t.length&&m.request({url:"logger:download",method:"post",responseType:"blob",data:{files:t}}).then(function(e){var t=window.URL.createObjectURL(new Blob([e.data],{type:"application/gzip"})),r=document.createElement("a");r.setAttribute("href",t),r.setAttribute("download","logs.tar.gz"),r.click(),r.remove()}).catch(function(e){console.log(e)})}},s("Download")," (.tar.gz)"))});v.displayName="LogsDownloader"}}]);
|