@nocobase/plugin-logger 1.2.12-alpha → 1.3.0-alpha.20240710084543

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/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "日志",
5
5
  "description": "Server-side logs, mainly including API request logs and system runtime logs, and allows to package and download log files.",
6
6
  "description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。",
7
- "version": "1.2.12-alpha",
7
+ "version": "1.3.0-alpha.20240710084543",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/logger",
@@ -19,7 +19,7 @@
19
19
  "@nocobase/server": "1.x",
20
20
  "@nocobase/test": "1.x"
21
21
  },
22
- "gitHead": "553231d4882496cb7f1f17fa7541899ce82a27ab",
22
+ "gitHead": "07a8b596fc64a9779a194cb9b0dc2ca7570ed9d4",
23
23
  "keywords": [
24
24
  "Logging and monitoring"
25
25
  ]
@@ -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
- import React from 'react';
10
- export declare const LogsDownloader: React.NamedExoticComponent<object>;
@@ -1,15 +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
- import { Plugin } from '@nocobase/client';
10
- export declare class PluginLoggerClient extends Plugin {
11
- afterAdd(): Promise<void>;
12
- beforeLoad(): Promise<void>;
13
- load(): Promise<void>;
14
- }
15
- export default PluginLoggerClient;
@@ -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
- (function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("@nocobase/client"),require("react-i18next"),require("react/jsx-runtime"),require("react"),require("antd"),require("@ant-design/icons"),require("ahooks")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react-i18next","react/jsx-runtime","react","antd","@ant-design/icons","ahooks"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["@nocobase/plugin-logger"]={},e["@nocobase/client"],e["react-i18next"],e.jsxRuntime,e.react,e.antd,e["@ant-design/icons"],e.ahooks))})(this,function(e,t,s,r,a,d,k,y){"use strict";var Y=Object.defineProperty,Z=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var V=(e,t,s)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,A=(e,t)=>{for(var s in t||(t={}))ee.call(t,s)&&V(e,s,t[s]);if($)for(var s of $(t))te.call(t,s)&&V(e,s,t[s]);return e},C=(e,t)=>Z(e,R(t));var S=(e,t,s)=>new Promise((r,a)=>{var d=p=>{try{y(s.next(p))}catch(f){a(f)}},k=p=>{try{y(s.throw(p))}catch(f){a(f)}},y=p=>p.done?r(p.value):Promise.resolve(p.value).then(d,k);y((s=s.apply(e,t)).next())});const p="logger";function f(g){return t.i18n.t(g,{ns:p})}function L(){return s.useTranslation(p)}const{Paragraph:E,Text:b}=d.Typography,M=a.memo(()=>{const{t:g}=L();return r.jsxs(d.Typography,{children:[r.jsxs(E,{children:[r.jsx(b,{code:!0,children:"request_*.log"})," - ",g("API request and response logs")]}),r.jsxs(E,{children:[r.jsx(b,{code:!0,children:"system_*.log"})," -"," ",g("Application, database, plugins and other system logs, the error level logs will be sent to")," ",r.jsx(b,{code:!0,children:"system_error_*.log"})]}),r.jsxs(E,{children:[r.jsx(b,{code:!0,children:"sql_*.log"})," - ",g("SQL execution logs, printed by Sequelize when the db logging is enabled")]})]})});M.displayName="Tips";const _=a.memo(g=>{const{token:P}=d.theme.useToken(),{t:H}=L(),T=y.useMemoizedFn(H),v=t.useAPIClient(),[U,I]=a.useState(["0"]),[x,G]=a.useState(""),[Q,D]=a.useState(!0),[O,z]=a.useState([]),{data:K}=t.useRequest(()=>v.resource("logger").list().then(o=>{var u;return(u=o.data)==null?void 0:u.data})),q=a.useCallback((o,u)=>o.map((i,c)=>{const n=`${u}-${c}`;return typeof i=="string"?{title:i,key:n,icon:r.jsx(k.FileOutlined,{})}:{title:i.name,key:n,icon:r.jsx(k.FolderOutlined,{}),children:q(i.files,n)}}),[]),m=a.useMemo(()=>{const o=K||[];return[{title:T("All"),key:"0",children:q(o,"0")}]},[K,q,T]),J=o=>{I(o),D(!1)},W=o=>{const{value:u}=o.target,i=n=>n.reduce((l,h)=>{var w;return(w=h.title)!=null&&w.includes(u)&&l.push(h),h.children?[...l,...i(h.children)]:l},[]),c=i(m).map(n=>n.key);I(c),G(u),D(!0),z([])},B=a.useMemo(()=>{if(!x)return m;const o=u=>{const i=[];for(const c of u){const n=c.title,l=n.indexOf(x),h=n.substring(0,l),w=n.substring(l+x.length),F=l>-1?r.jsxs("span",{children:[h,r.jsx("span",{style:{color:P.colorPrimary},children:x}),w]}):r.jsx("span",{children:n});if(l>-1)i.push(C(A({},c),{title:F}));else if(c.children){const N=o(c.children);N.length&&i.push(C(A({},c),{title:F,children:N}))}}return i};return o(m)},[x,m,P.colorPrimary]),X=()=>{const o=(i,c)=>i.reduce((n,l)=>{let h=l.title;return h=l.key==="0"?h:`${c}/${h}`,l.children?[...n,...o(l.children,l.key==="0"?"":h)]:(O.includes(l.key)&&l.key!=="0"&&n.push(h),n)},[]),u=o(m,"");u.length&&v.request({url:"logger:download",method:"post",responseType:"blob",data:{files:u}}).then(i=>{const c=window.URL.createObjectURL(new Blob([i.data],{type:"application/gzip"})),n=document.createElement("a");n.setAttribute("href",c),n.setAttribute("download","logs.tar.gz"),n.click(),n.remove()}).catch(i=>{console.log(i)})};return r.jsxs(d.Card,{style:{minHeight:"700px"},children:[r.jsx(d.Alert,{message:"",description:r.jsx(M,{}),type:"info",showIcon:!0}),r.jsx(d.Input.Search,{style:{marginTop:16,width:"450px"},placeholder:T("Search"),onChange:W}),r.jsx("div",{style:{maxHeight:"400px",width:"450px",overflow:"auto",border:"1px solid",marginTop:"6px",marginBottom:"10px",borderColor:P.colorBorder},children:B.length?r.jsx(d.Tree,{checkable:!0,showIcon:!0,showLine:!0,checkedKeys:O,expandedKeys:U,autoExpandParent:Q,onExpand:J,onCheck:o=>z(o),treeData:B}):r.jsx(d.Empty,{image:d.Empty.PRESENTED_IMAGE_SIMPLE})}),r.jsxs(d.Button,{type:"primary",onClick:X,children:[T("Download")," (.tar.gz)"]})]})});_.displayName="LogsDownloader";class j extends t.Plugin{afterAdd(){return S(this,null,function*(){})}beforeLoad(){return S(this,null,function*(){})}load(){return S(this,null,function*(){this.app.pluginSettingsManager.add("logger",{title:f("Logger"),icon:"FileTextOutlined",Component:_})})}}e.PluginLoggerClient=j,e.default=j,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,11 +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
- export declare const NAMESPACE = "logger";
10
- export declare function lang(key: string): string;
11
- export declare function useLoggerTranslation(): import("react-i18next").UseTranslationResponse<"logger", undefined>;
@@ -1,21 +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
- module.exports = {
11
- "@nocobase/client": "1.2.12-alpha",
12
- "react": "18.2.0",
13
- "antd": "5.12.8",
14
- "@ant-design/icons": "5.2.6",
15
- "ahooks": "3.7.8",
16
- "@nocobase/server": "1.2.12-alpha",
17
- "react-i18next": "11.18.6",
18
- "@nocobase/actions": "1.2.12-alpha",
19
- "@nocobase/logger": "1.2.12-alpha",
20
- "lodash": "4.17.21"
21
- };
package/dist/index.d.ts DELETED
@@ -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
- export * from './server';
10
- export { default } from './server';
package/dist/index.js DELETED
@@ -1,48 +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
- var __create = Object.create;
11
- var __defProp = Object.defineProperty;
12
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
- var __getOwnPropNames = Object.getOwnPropertyNames;
14
- var __getProtoOf = Object.getPrototypeOf;
15
- var __hasOwnProp = Object.prototype.hasOwnProperty;
16
- var __export = (target, all) => {
17
- for (var name in all)
18
- __defProp(target, name, { get: all[name], enumerable: true });
19
- };
20
- var __copyProps = (to, from, except, desc) => {
21
- if (from && typeof from === "object" || typeof from === "function") {
22
- for (let key of __getOwnPropNames(from))
23
- if (!__hasOwnProp.call(to, key) && key !== except)
24
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
- }
26
- return to;
27
- };
28
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
29
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
30
- // If the importer is in node compatibility mode or this is not an ESM
31
- // file that has been converted to a CommonJS file using a Babel-
32
- // compatible transform (i.e. "__esModule" has not been set), then set
33
- // "default" to the CommonJS "module.exports" for node compatibility.
34
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
35
- mod
36
- ));
37
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
- var src_exports = {};
39
- __export(src_exports, {
40
- default: () => import_server.default
41
- });
42
- module.exports = __toCommonJS(src_exports);
43
- __reExport(src_exports, require("./server"), module.exports);
44
- var import_server = __toESM(require("./server"));
45
- // Annotate the CommonJS export names for ESM import in node:
46
- 0 && (module.exports = {
47
- ...require("./server")
48
- });
@@ -1,18 +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
- declare const _default: {
10
- Logger: string;
11
- Search: string;
12
- Download: string;
13
- 'Download logs': string;
14
- 'API request and response logs': string;
15
- 'Application, database, plugins and other system logs, the error level logs will be sent to': string;
16
- 'SQL execution logs, printed by Sequelize when the db logging is enabled': string;
17
- };
18
- export default _default;
@@ -1,40 +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
- var __defProp = Object.defineProperty;
11
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
- var __getOwnPropNames = Object.getOwnPropertyNames;
13
- var __hasOwnProp = Object.prototype.hasOwnProperty;
14
- var __export = (target, all) => {
15
- for (var name in all)
16
- __defProp(target, name, { get: all[name], enumerable: true });
17
- };
18
- var __copyProps = (to, from, except, desc) => {
19
- if (from && typeof from === "object" || typeof from === "function") {
20
- for (let key of __getOwnPropNames(from))
21
- if (!__hasOwnProp.call(to, key) && key !== except)
22
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
- }
24
- return to;
25
- };
26
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
- var en_US_exports = {};
28
- __export(en_US_exports, {
29
- default: () => en_US_default
30
- });
31
- module.exports = __toCommonJS(en_US_exports);
32
- var en_US_default = {
33
- Logger: "Logger",
34
- Search: "Search",
35
- Download: "Download",
36
- "Download logs": "Download logs",
37
- "API request and response logs": "API request and response logs",
38
- "Application, database, plugins and other system logs, the error level logs will be sent to": "Application, database, plugins and other system logs, the error level logs will be sent to",
39
- "SQL execution logs, printed by Sequelize when the db logging is enabled": "SQL execution logs, printed by Sequelize when the db logging is enabled"
40
- };
@@ -1,18 +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
- declare const _default: {
10
- Logger: string;
11
- Search: string;
12
- Download: string;
13
- "Download logs": string;
14
- "API request and response logs": string;
15
- "Application, database, plugins and other system logs, the error level logs will be sent to": string;
16
- "SQL execution logs, printed by Sequelize when the db logging is enabled": string;
17
- };
18
- export default _default;
@@ -1,40 +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
- var __defProp = Object.defineProperty;
11
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
- var __getOwnPropNames = Object.getOwnPropertyNames;
13
- var __hasOwnProp = Object.prototype.hasOwnProperty;
14
- var __export = (target, all) => {
15
- for (var name in all)
16
- __defProp(target, name, { get: all[name], enumerable: true });
17
- };
18
- var __copyProps = (to, from, except, desc) => {
19
- if (from && typeof from === "object" || typeof from === "function") {
20
- for (let key of __getOwnPropNames(from))
21
- if (!__hasOwnProp.call(to, key) && key !== except)
22
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
- }
24
- return to;
25
- };
26
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
- var ko_KR_exports = {};
28
- __export(ko_KR_exports, {
29
- default: () => ko_KR_default
30
- });
31
- module.exports = __toCommonJS(ko_KR_exports);
32
- var ko_KR_default = {
33
- "Logger": "\uAE30\uB85D\uAE30",
34
- "Search": "\uAC80\uC0C9",
35
- "Download": "\uB2E4\uC6B4\uB85C\uB4DC",
36
- "Download logs": "\uB85C\uADF8 \uB2E4\uC6B4\uB85C\uB4DC",
37
- "API request and response logs": "API \uC694\uCCAD \uBC0F \uC751\uB2F5 \uB85C\uADF8",
38
- "Application, database, plugins and other system logs, the error level logs will be sent to": "\uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8, \uB370\uC774\uD130\uBCA0\uC774\uC2A4, \uD50C\uB7EC\uADF8\uC778 \uBC0F \uAE30\uD0C0 \uC2DC\uC2A4\uD15C \uB85C\uADF8, \uC624\uB958 \uC218\uC900 \uB85C\uADF8\uAC00 \uC804\uC1A1\uB429\uB2C8\uB2E4:",
39
- "SQL execution logs, printed by Sequelize when the db logging is enabled": "\uB370\uC774\uD130\uBCA0\uC774\uC2A4 \uB85C\uAE45\uC774 \uD65C\uC131\uD654\uB418\uC5B4 \uC788\uC744 \uB54C Sequelize\uC5D0\uC11C \uC778\uC1C4\uD558\uB294 SQL \uC2E4\uD589 \uB85C\uADF8"
40
- };
@@ -1,18 +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
- declare const _default: {
10
- Logger: string;
11
- Search: string;
12
- Download: string;
13
- 'Download logs': string;
14
- 'API request and response logs': string;
15
- 'Application, database, plugins and other system logs, the error level logs will be sent to': string;
16
- 'SQL execution logs, printed by Sequelize when the db logging is enabled': string;
17
- };
18
- export default _default;
@@ -1,40 +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
- var __defProp = Object.defineProperty;
11
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
- var __getOwnPropNames = Object.getOwnPropertyNames;
13
- var __hasOwnProp = Object.prototype.hasOwnProperty;
14
- var __export = (target, all) => {
15
- for (var name in all)
16
- __defProp(target, name, { get: all[name], enumerable: true });
17
- };
18
- var __copyProps = (to, from, except, desc) => {
19
- if (from && typeof from === "object" || typeof from === "function") {
20
- for (let key of __getOwnPropNames(from))
21
- if (!__hasOwnProp.call(to, key) && key !== except)
22
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
- }
24
- return to;
25
- };
26
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
- var zh_CN_exports = {};
28
- __export(zh_CN_exports, {
29
- default: () => zh_CN_default
30
- });
31
- module.exports = __toCommonJS(zh_CN_exports);
32
- var zh_CN_default = {
33
- Logger: "\u65E5\u5FD7",
34
- Search: "\u641C\u7D22",
35
- Download: "\u4E0B\u8F7D",
36
- "Download logs": "\u4E0B\u8F7D\u65E5\u5FD7",
37
- "API request and response logs": "API \u63A5\u53E3\u8BF7\u6C42\u548C\u54CD\u5E94\u65E5\u5FD7",
38
- "Application, database, plugins and other system logs, the error level logs will be sent to": "\u5E94\u7528\u3001\u6570\u636E\u5E93\u3001\u63D2\u4EF6\u548C\u5176\u4ED6\u7CFB\u7EDF\u65E5\u5FD7\uFF0C\u9519\u8BEF\u7EA7\u522B\u65E5\u5FD7\u5C06\u4F1A\u6253\u5370\u5230",
39
- "SQL execution logs, printed by Sequelize when the db logging is enabled": "SQL \u6267\u884C\u65E5\u5FD7, \u6570\u636E\u5E93\u65E5\u5FD7\u542F\u7528\u65F6\uFF0CSequelize \u6253\u5370\u7684 SQL \u6267\u884C\u65E5\u5FD7"
40
- };
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2014 Mathias Buus
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1 +0,0 @@
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,14 +0,0 @@
1
- const constants = { // just for envs without fs
2
- S_IFMT: 61440,
3
- S_IFDIR: 16384,
4
- S_IFCHR: 8192,
5
- S_IFBLK: 24576,
6
- S_IFIFO: 4096,
7
- S_IFLNK: 40960
8
- }
9
-
10
- try {
11
- module.exports = require('fs').constants || constants
12
- } catch {
13
- module.exports = constants
14
- }