aronrepo 1.5.2 → 2.0.0

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.
@@ -1,124 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our
6
- community a harassment-free experience for everyone, regardless of age, body
7
- size, visible or invisible disability, ethnicity, sex characteristics, gender
8
- identity and expression, level of experience, education, socio-economic status,
9
- nationality, personal appearance, race, religion, or sexual identity
10
- and orientation.
11
-
12
- We pledge to act and interact in ways that contribute to an open, welcoming,
13
- diverse, inclusive, and healthy community.
14
-
15
- ## Our Standards
16
-
17
- Examples of behavior that contributes to a positive environment for our
18
- community include:
19
-
20
- * Demonstrating empathy and kindness toward other people
21
- * Being respectful of differing opinions, viewpoints, and experiences
22
- * Giving and gracefully accepting constructive feedback
23
- * Accepting responsibility and apologizing to those affected by our mistakes,
24
- and learning from the experience
25
- * Focusing on what is best not just for us as individuals, but for the
26
- overall community
27
-
28
- Examples of unacceptable behavior include:
29
-
30
- * The use of sexualized language or imagery, and sexual attention or
31
- advances of any kind
32
- * Trolling, insulting or derogatory comments, and personal or political attacks
33
- * Public or private harassment
34
- * Publishing others' private information, such as a physical or email
35
- address, without their explicit permission
36
- * Other conduct which could reasonably be considered inappropriate in a
37
- professional setting
38
-
39
- ## Enforcement Responsibilities
40
-
41
- Community leaders are responsible for clarifying and enforcing our standards of
42
- acceptable behavior and will take appropriate and fair corrective action in
43
- response to any behavior that they deem inappropriate, threatening, offensive,
44
- or harmful.
45
-
46
- Community leaders have the right and responsibility to remove, edit, or reject
47
- comments, commits, code, wiki edits, issues, and other contributions that are
48
- not aligned to this Code of Conduct, and will communicate reasons for moderation
49
- decisions when appropriate.
50
-
51
- ## Scope
52
-
53
- This Code of Conduct applies within all community spaces, and also applies when
54
- an individual is officially representing the community in public spaces.
55
- Examples of representing our community include using an official e-mail address,
56
- posting via an official social media account, or acting as an appointed
57
- representative at an online or offline event.
58
-
59
- ## Enforcement
60
-
61
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement. All complaints will be reviewed and investigated promptly and fairly.
62
-
63
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
64
-
65
- ## Enforcement Guidelines
66
-
67
- Community leaders will follow these Community Impact Guidelines in determining
68
- the consequences for any action they deem in violation of this Code of Conduct:
69
-
70
- ### 1. Correction
71
-
72
- **Community Impact**: Use of inappropriate language or other behavior deemed
73
- unprofessional or unwelcome in the community.
74
-
75
- **Consequence**: A private, written warning from community leaders, providing
76
- clarity around the nature of the violation and an explanation of why the
77
- behavior was inappropriate. A public apology may be requested.
78
-
79
- ### 2. Warning
80
-
81
- **Community Impact**: A violation through a single incident or series
82
- of actions.
83
-
84
- **Consequence**: A warning with consequences for continued behavior. No
85
- interaction with the people involved, including unsolicited interaction with
86
- those enforcing the Code of Conduct, for a specified period of time. This
87
- includes avoiding interactions in community spaces as well as external channels
88
- like social media. Violating these terms may lead to a temporary or
89
- permanent ban.
90
-
91
- ### 3. Temporary Ban
92
-
93
- **Community Impact**: A serious violation of community standards, including
94
- sustained inappropriate behavior.
95
-
96
- **Consequence**: A temporary ban from any sort of interaction or public
97
- communication with the community for a specified period of time. No public or
98
- private interaction with the people involved, including unsolicited interaction
99
- with those enforcing the Code of Conduct, is allowed during this period.
100
- Violating these terms may lead to a permanent ban.
101
-
102
- ### 4. Permanent Ban
103
-
104
- **Community Impact**: Demonstrating a pattern of violation of community
105
- standards, including sustained inappropriate behavior, harassment of an
106
- individual, or aggression toward or disparagement of classes of individuals.
107
-
108
- **Consequence**: A permanent ban from any sort of public interaction within
109
- the community.
110
-
111
- ## Attribution
112
-
113
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
114
- version 2.0, available at
115
- https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
116
-
117
- Community Impact Guidelines were inspired by [Mozilla's code of conduct
118
- enforcement ladder](https://github.com/mozilla/diversity).
119
-
120
- [homepage]: https://www.contributor-covenant.org
121
-
122
- For answers to common questions about this code of conduct, see the FAQ at
123
- https://www.contributor-covenant.org/faq. Translations are available at
124
- https://www.contributor-covenant.org/translations.
@@ -1,77 +0,0 @@
1
- # Contributing
2
- This guide follows the relevant specifications and presets of [Aronrepo](https://github.com/1aron/aronrepo):
3
-
4
- - [Aron's Conventional Commits](https://github.com/1aron/aronrepo/tree/main/packages/conventional-commits)
5
- - [Aron's ESLint Config](https://github.com/1aron/aronrepo/tree/main/packages/eslint-config)
6
- - [Aron's Jest Preset](https://github.com/1aron/aronrepo/tree/main/packages/jest)
7
- - [Aron's Web Jest Preset](https://github.com/1aron/aronrepo/tree/main/packages/web-jest)
8
-
9
- ## Developing
10
- Split a new terminal and run `npm run dev` in the project root to watch all packages change and build:
11
- ```bash
12
- npm run dev
13
- ```
14
- Split a new terminal and switch to the target directory for testing to avoid running tests from other packages:
15
- ```bash
16
- cd packages/target
17
- ```
18
- ```bash
19
- npm run test -- --watch
20
- ```
21
-
22
- ## Testing
23
- ```bash
24
- npm run test
25
- ```
26
-
27
- ### Contributing your test cases
28
- Taking the [Master CSS project](https://github.com/master-co/css/tree/beta) as an example, you can freely create a file like [packages/css/tests/contributions/aron.test.ts](https://github.com/master-co/css/tree/dev/beta/packages/css/tests/contributions) for unit testing:
29
-
30
- ```ts
31
- import { testProp, testCSS } from '../src/utils/test-css'
32
-
33
- it('should generated with `background-color:` instead of `background:`', () => {
34
- testProp('bg:red', 'background-color:#d11a1e')
35
- })
36
-
37
- it('should contain the `:hover` selector', () => {
38
- testProp('fg:white:hover', '.f\\:white\\:hover:hover{color:#ffffff}')
39
- })
40
- ```
41
-
42
- Commit your tests ( and create a Pull Request ):
43
- ```bash
44
- Add @1aron tests
45
- ```
46
-
47
- ## Linting
48
- ```bash
49
- npm run lint
50
- ```
51
-
52
- To automatically fix any violations in your code:
53
- ```
54
- npm run lint -- --fix
55
- ```
56
-
57
- ## Type Checking
58
- ```bash
59
- npm run type-check
60
- ```
61
-
62
- ## Commit Checking
63
- ```bash
64
- npm run commit-check
65
- ```
66
-
67
- ## Checking
68
- You have to pass `npm run check` before submitting a pull request.
69
- ```bash
70
- npm run check
71
- ```
72
- The command includes all of the following checks:
73
-
74
- ## Building
75
- ```
76
- npm run build
77
- ```
@@ -1,47 +0,0 @@
1
- name: "🐞 Bug"
2
- description: Report a bug
3
- title: '🐞 '
4
- labels: [bug]
5
-
6
- body:
7
- - type: markdown
8
- attributes:
9
- value: Thanks for taking the time to make a bug report!
10
-
11
- - type: textarea
12
- id: description
13
- attributes:
14
- label: Description
15
- description: Please provide a detailed description to tell us what the bug is. Also tell us what is the expected behavior you think.
16
- placeholder: When I am going to ... by using ..., the "..." error happens. ...
17
- validations:
18
- required: true
19
-
20
- - type: textarea
21
- id: reproduction
22
- attributes:
23
- label: Reproduction
24
- description: Please provide a step-by-step [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) of the bug. It helps us to efficiently track down the bug.
25
- placeholder: |
26
- 1. ...
27
- 2. ...
28
- 3. ...
29
- validations:
30
- required: false
31
-
32
- - type: textarea
33
- id: system
34
- attributes:
35
- label: System Informations
36
- description: Please provide the system informations related to the bug. Browser, OS, Node.js, Package Manager ...
37
- placeholder: |
38
- Browser: Chrome 99.0.1234.56
39
- OS: macOS 12.0.1 (amd64)
40
- Node.js: 16.31.1
41
- Package Manager: pnpm 6.32.3
42
- validations:
43
- required: true
44
-
45
- - type: markdown
46
- attributes:
47
- value: Thank you for the bug report! We will try to investigate the bug as soon as possible.
@@ -1,24 +0,0 @@
1
- name: '📄 Documentation'
2
- description: A request to update or improve documentation
3
- title: '📄 '
4
- labels: [documentation]
5
-
6
- body:
7
- - type: textarea
8
- attributes:
9
- label: What is the improvement or update you wish to see?
10
- description: 'Example: I would like to see more examples of how to use the xxx. Or, the xxx docs are missing information.'
11
- validations:
12
- required: true
13
- - type: textarea
14
- attributes:
15
- label: Is there any context that might help us understand?
16
- description: A clear description of any added context that might help us understand.
17
- validations:
18
- required: true
19
- - type: input
20
- attributes:
21
- label: Does the docs page already exist? Please link to it.
22
- placeholder: https://
23
- validations:
24
- required: false
@@ -1,19 +0,0 @@
1
- name: "✨ Feature"
2
- description: Propose a new feature
3
- title: '✨ '
4
- labels: [enhancement]
5
-
6
- body:
7
- - type: markdown
8
- attributes:
9
- value: Have a great idea for a new feature? Let us know!
10
-
11
- - type: textarea
12
- id: description
13
- attributes:
14
- label: Description
15
- description: |
16
- Please tell us what you want to see in the next release and why you want to see it.
17
- If you are going to make a pull request, please let us know your scheduling.
18
- validations:
19
- required: true
@@ -1,30 +0,0 @@
1
- name: Commit Check
2
- on:
3
- push:
4
- branches:
5
- - '**'
6
- pull_request_target:
7
- types:
8
- - opened
9
- - reopened
10
- - edited
11
- - synchronize
12
-
13
- jobs:
14
- check:
15
- name: 'commit-check'
16
- timeout-minutes: 15
17
- runs-on: ubuntu-20.04
18
- strategy:
19
- matrix:
20
- node-version: [18.12.1]
21
- steps:
22
- - uses: actions/checkout@v3
23
- with:
24
- fetch-depth: 0
25
- - uses: actions/setup-node@v3
26
- with:
27
- node-version: ${{ matrix.node-version }}
28
- cache: 'npm'
29
- - run: npm ci
30
- - run: npm run commit-check
@@ -1,27 +0,0 @@
1
- name: Lint
2
- on:
3
- push:
4
- branches:
5
- - '**'
6
- pull_request_target:
7
- types:
8
- - opened
9
- - reopened
10
- - edited
11
- - synchronize
12
-
13
- jobs:
14
- lint:
15
- timeout-minutes: 15
16
- runs-on: ubuntu-20.04
17
- strategy:
18
- matrix:
19
- node-version: [18.12.1]
20
- steps:
21
- - uses: actions/checkout@v3
22
- - uses: actions/setup-node@v3
23
- with:
24
- node-version: ${{ matrix.node-version }}
25
- cache: 'npm'
26
- - run: npm ci
27
- - run: npm run lint
@@ -1,23 +0,0 @@
1
- name: Check title of pull request
2
- on:
3
- pull_request_target:
4
- types:
5
- - opened
6
- - reopened
7
- - edited
8
- - synchronize
9
-
10
- jobs:
11
- check:
12
- timeout-minutes: 15
13
- runs-on: ubuntu-20.04
14
- strategy:
15
- matrix:
16
- node-version: [18.12.1]
17
- steps:
18
- - name: Aron Actions
19
- uses: 1aron/aronrepo@1.0.0
20
- with:
21
- action: 'check-pull-request-title'
22
- env:
23
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,35 +0,0 @@
1
- name: Release
2
- on:
3
- push:
4
- branches:
5
- - main
6
- - beta
7
-
8
- jobs:
9
- version:
10
- timeout-minutes: 15
11
- runs-on: ubuntu-20.04
12
- strategy:
13
- matrix:
14
- node-version: [18.12.1]
15
- steps:
16
- - uses: actions/checkout@v3
17
- - uses: actions/setup-node@v3
18
- with:
19
- node-version: ${{ matrix.node-version }}
20
- registry-url: 'https://registry.npmjs.org'
21
- cache: 'npm'
22
- - run: npm ci
23
- - run: npm run build
24
-
25
- - uses: lewagon/wait-on-check-action@v1.2.0
26
- with:
27
- ref: ${{ github.ref }}
28
- check-regexp: test.*|check.*|commit-check.*|lint.*
29
- repo-token: ${{ secrets.GITHUB_TOKEN }}
30
- wait-interval: 10
31
-
32
- - run: npx --no -- semantic-release
33
- env:
34
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,30 +0,0 @@
1
- name: Test
2
- on:
3
- push:
4
- branches:
5
- - '**'
6
- pull_request_target:
7
- types:
8
- - opened
9
- - reopened
10
- - edited
11
- - synchronize
12
-
13
- jobs:
14
- test:
15
- timeout-minutes: 15
16
- runs-on: ${{ matrix.os }}
17
- strategy:
18
- matrix:
19
- node-version: [18.12.1]
20
- os: [ubuntu-latest, windows-latest]
21
-
22
- steps:
23
- - uses: actions/checkout@v3
24
- - uses: actions/setup-node@v3
25
- with:
26
- node-version: ${{ matrix.node-version }}
27
- cache: 'npm'
28
- - run: npm ci
29
- - run: npm run build
30
- - run: npm run test
@@ -1,28 +0,0 @@
1
- name: Type Check
2
- on:
3
- push:
4
- branches:
5
- - '**'
6
- pull_request_target:
7
- types:
8
- - opened
9
- - reopened
10
- - edited
11
- - synchronize
12
-
13
- jobs:
14
- check:
15
- timeout-minutes: 15
16
- runs-on: ubuntu-20.04
17
- strategy:
18
- matrix:
19
- node-version: [18.12.1]
20
- steps:
21
- - uses: actions/checkout@v3
22
- - uses: actions/setup-node@v3
23
- with:
24
- node-version: ${{ matrix.node-version }}
25
- cache: 'npm'
26
- - run: npm ci
27
- - run: npm run build
28
- - run: npm run type-check
package/dist/bin/index DELETED
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
- var qo=Object.create;var Mt=Object.defineProperty;var Wo=Object.getOwnPropertyDescriptor;var zo=Object.getOwnPropertyNames;var Ho=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Xo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of zo(t))!Ko.call(e,o)&&o!==n&&Mt(e,o,{get:()=>t[o],enumerable:!(r=Wo(t,o))||r.enumerable});return e};var h=(e,t,n)=>(n=e!=null?qo(Ho(e)):{},Xo(t||!e||!e.__esModule?Mt(n,"default",{value:e,enumerable:!0}):n,e));var Xt=v((ic,Kt)=>{Kt.exports=Ht;Ht.sync=Zo;var Wt=require("fs");function Yo(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function zt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Yo(t,n)}function Ht(e,t,n){Wt.stat(e,function(r,o){n(r,r?!1:zt(o,e,t))})}function Zo(e,t){return zt(Wt.statSync(e),e,t)}});var Qt=v((sc,Zt)=>{Zt.exports=Jt;Jt.sync=Qo;var Vt=require("fs");function Jt(e,t,n){Vt.stat(e,function(r,o){n(r,r?!1:Yt(o,t))})}function Qo(e,t){return Yt(Vt.statSync(e),t)}function Yt(e,t){return e.isFile()&&ei(e,t)}function ei(e,t){var n=e.mode,r=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),a=parseInt("001",8),f=u|c,p=n&a||n&c&&o===s||n&u&&r===i||n&f&&i===0;return p}});var tn=v((cc,en)=>{var ac=require("fs"),xe;process.platform==="win32"||global.TESTING_WINDOWS?xe=Xt():xe=Qt();en.exports=Ue;Ue.sync=ti;function Ue(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,o){Ue(e,t||{},function(i,s){i?o(i):r(s)})})}xe(e,t||{},function(r,o){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,o=!1),n(r,o)})}function ti(e,t){try{return xe.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var un=v((uc,cn)=>{var H=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",nn=require("path"),ni=H?";":":",rn=tn(),on=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),sn=(e,t)=>{let n=t.colon||ni,r=e.match(/\//)||H&&e.match(/\\/)?[""]:[...H?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=H?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=H?o.split(n):[""];return H&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:o}},an=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:o,pathExtExe:i}=sn(e,t),s=[],u=a=>new Promise((f,p)=>{if(a===r.length)return t.all&&s.length?f(s):p(on(e));let l=r[a],m=/^".*"$/.test(l)?l.slice(1,-1):l,d=nn.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;f(c(y,a,0))}),c=(a,f,p)=>new Promise((l,m)=>{if(p===o.length)return l(u(f+1));let d=o[p];rn(a+d,{pathExt:i},(y,g)=>{if(!y&&g)if(t.all)s.push(a+d);else return l(a+d);return l(c(a,f,p+1))})});return n?u(0).then(a=>n(null,a),n):u(0)},ri=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:o}=sn(e,t),i=[];for(let s=0;s<n.length;s++){let u=n[s],c=/^".*"$/.test(u)?u.slice(1,-1):u,a=nn.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+a:a;for(let p=0;p<r.length;p++){let l=f+r[p];try{if(rn.sync(l,{pathExt:o}))if(t.all)i.push(l);else return l}catch{}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw on(e)};cn.exports=an;an.sync=ri});var ln=v((fc,qe)=>{"use strict";var fn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};qe.exports=fn;qe.exports.default=fn});var gn=v((lc,mn)=>{"use strict";var dn=require("path"),oi=un(),ii=ln();function pn(e,t){let n=e.options.env||process.env,r=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=oi.sync(e.command,{path:n[ii({env:n})],pathExt:t?dn.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return s&&(s=dn.resolve(o?e.options.cwd:"",s)),s}function si(e){return pn(e)||pn(e,!0)}mn.exports=si});var hn=v((dc,ze)=>{"use strict";var We=/([()\][%!^"`<>&|;, *?])/g;function ai(e){return e=e.replace(We,"^$1"),e}function ci(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(We,"^$1"),t&&(e=e.replace(We,"^$1")),e}ze.exports.command=ai;ze.exports.argument=ci});var xn=v((pc,yn)=>{"use strict";yn.exports=/^#!(.*)/});var wn=v((mc,bn)=>{"use strict";var ui=xn();bn.exports=(e="")=>{let t=e.match(ui);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return o==="env"?r:r?`${o} ${r}`:o}});var vn=v((gc,Sn)=>{"use strict";var He=require("fs"),fi=wn();function li(e){let n=Buffer.alloc(150),r;try{r=He.openSync(e,"r"),He.readSync(r,n,0,150,0),He.closeSync(r)}catch{}return fi(n.toString())}Sn.exports=li});var _n=v((hc,Pn)=>{"use strict";var di=require("path"),En=gn(),Tn=hn(),pi=vn(),mi=process.platform==="win32",gi=/\.(?:com|exe)$/i,hi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function yi(e){e.file=En(e);let t=e.file&&pi(e.file);return t?(e.args.unshift(e.file),e.command=t,En(e)):e.file}function xi(e){if(!mi)return e;let t=yi(e),n=!gi.test(t);if(e.options.forceShell||n){let r=hi.test(t);e.command=di.normalize(e.command),e.command=Tn.command(e.command),e.args=e.args.map(i=>Tn.argument(i,r));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function bi(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:xi(r)}Pn.exports=bi});var On=v((yc,In)=>{"use strict";var Ke=process.platform==="win32";function Xe(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function wi(e,t){if(!Ke)return;let n=e.emit;e.emit=function(r,o){if(r==="exit"){let i=jn(o,t,"spawn");if(i)return n.call(e,"error",i)}return n.apply(e,arguments)}}function jn(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawn"):null}function Si(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawnSync"):null}In.exports={hookChildProcess:wi,verifyENOENT:jn,verifyENOENTSync:Si,notFoundError:Xe}});var kn=v((xc,K)=>{"use strict";var Cn=require("child_process"),Ve=_n(),Je=On();function An(e,t,n){let r=Ve(e,t,n),o=Cn.spawn(r.command,r.args,r.options);return Je.hookChildProcess(o,r),o}function vi(e,t,n){let r=Ve(e,t,n),o=Cn.spawnSync(r.command,r.args,r.options);return o.error=o.error||Je.verifyENOENTSync(o.status,r),o}K.exports=An;K.exports.spawn=An;K.exports.sync=vi;K.exports._parse=Ve;K.exports._enoent=Je});var Wn=v((Gc,ve)=>{ve.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&ve.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ve.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Vn=v((Mc,Y)=>{var S=global.process,M=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};M(S)?(zn=require("assert"),V=Wn(),Hn=/^win/i.test(S.platform),ie=require("events"),typeof ie!="function"&&(ie=ie.EventEmitter),S.__signal_exit_emitter__?T=S.__signal_exit_emitter__:(T=S.__signal_exit_emitter__=new ie,T.count=0,T.emitted={}),T.infinite||(T.setMaxListeners(1/0),T.infinite=!0),Y.exports=function(e,t){if(!M(global.process))return function(){};zn.equal(typeof e,"function","a callback must be provided for exit handler"),J===!1&&nt();var n="exit";t&&t.alwaysLast&&(n="afterexit");var r=function(){T.removeListener(n,e),T.listeners("exit").length===0&&T.listeners("afterexit").length===0&&Ee()};return T.on(n,e),r},Ee=function(){!J||!M(global.process)||(J=!1,V.forEach(function(t){try{S.removeListener(t,Te[t])}catch{}}),S.emit=Pe,S.reallyExit=rt,T.count-=1)},Y.exports.unload=Ee,L=function(t,n,r){T.emitted[t]||(T.emitted[t]=!0,T.emit(t,n,r))},Te={},V.forEach(function(e){Te[e]=function(){if(M(global.process)){var n=S.listeners(e);n.length===T.count&&(Ee(),L("exit",null,e),L("afterexit",null,e),Hn&&e==="SIGHUP"&&(e="SIGINT"),S.kill(S.pid,e))}}}),Y.exports.signals=function(){return V},J=!1,nt=function(){J||!M(global.process)||(J=!0,T.count+=1,V=V.filter(function(t){try{return S.on(t,Te[t]),!0}catch{return!1}}),S.emit=Xn,S.reallyExit=Kn)},Y.exports.load=nt,rt=S.reallyExit,Kn=function(t){M(global.process)&&(S.exitCode=t||0,L("exit",S.exitCode,null),L("afterexit",S.exitCode,null),rt.call(S,S.exitCode))},Pe=S.emit,Xn=function(t,n){if(t==="exit"&&M(global.process)){n!==void 0&&(S.exitCode=n);var r=Pe.apply(this,arguments);return L("exit",S.exitCode,null),L("afterexit",S.exitCode,null),r}else return Pe.apply(this,arguments)}):Y.exports=function(){return function(){}};var zn,V,Hn,ie,T,Ee,L,Te,J,nt,rt,Kn,Pe,Xn});var ir=v((Uc,or)=>{"use strict";var{PassThrough:Hi}=require("stream");or.exports=e=>{e={...e};let{array:t}=e,{encoding:n}=e,r=n==="buffer",o=!1;t?o=!(n||r):n=n||"utf8",r&&(n=null);let i=new Hi({objectMode:o});n&&i.setEncoding(n);let s=0,u=[];return i.on("data",c=>{u.push(c),o?s=u.length:s+=c.length}),i.getBufferedValue=()=>t?u:r?Buffer.concat(u,s):u.join(""),i.getBufferedLength=()=>s,i}});var sr=v((qc,se)=>{"use strict";var{constants:Ki}=require("buffer"),Xi=require("stream"),{promisify:Vi}=require("util"),Ji=ir(),Yi=Vi(Xi.pipeline),_e=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function ot(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,r=Ji(t);return await new Promise((o,i)=>{let s=u=>{u&&r.getBufferedLength()<=Ki.MAX_LENGTH&&(u.bufferedData=r.getBufferedValue()),i(u)};(async()=>{try{await Yi(e,r),o()}catch(u){s(u)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new _e)})}),r.getBufferedValue()}se.exports=ot;se.exports.buffer=(e,t)=>ot(e,{...t,encoding:"buffer"});se.exports.array=(e,t)=>ot(e,{...t,array:!0});se.exports.MaxBufferError=_e});var cr=v((Wc,ar)=>{"use strict";var{PassThrough:Zi}=require("stream");ar.exports=function(){var e=[],t=new Zi({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),t;function n(i){return Array.isArray(i)?(i.forEach(n),this):(e.push(i),i.once("end",o.bind(null,i)),i.once("error",t.emit.bind(t,"error")),i.pipe(t,{end:!1}),this)}function r(){return e.length==0}function o(i){e=e.filter(function(s){return s!==i}),!e.length&&t.readable&&t.end()}}});var ee=v(Or=>{var xt="2.0.1",_r,je,jr,wt,St,Z,fe,ue,bt,Q,_,Ir=[].slice,ds=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},ps={}.hasOwnProperty;fe=require("path");jr=function(e){return typeof e=="function"};wt=function(e){return typeof e=="string"||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"};_=Or;_.VERSION=typeof xt<"u"&&xt!==null?xt:"NO-VERSION";Q=function(e){return e=e.replace(/\\/g,"/"),e=e.replace(/(?<!^)\/+/g,"/"),e};for(ue in fe)bt=fe[ue],jr(bt)?_[ue]=function(e){return function(){var t,n;return t=1<=arguments.length?Ir.call(arguments,0):[],t=t.map(function(r){return wt(r)?Q(r):r}),n=fe[e].apply(fe,t),wt(n)?Q(n):n}}(ue):_[ue]=bt;_.sep="/";je={toUnix:Q,normalizeSafe:function(e){var t;return e=Q(e),t=_.normalize(e),e.startsWith("./")&&!t.startsWith("./")&&!t.startsWith("..")?t="./"+t:e.startsWith("//")&&!t.startsWith("//")&&(e.startsWith("//./")?t="//."+t:t="/"+t),t},normalizeTrim:function(e){return e=_.normalizeSafe(e),e.endsWith("/")?e.slice(0,+(e.length-2)+1||9e9):e},joinSafe:function(){var e,t,n;return e=1<=arguments.length?Ir.call(arguments,0):[],n=_.join.apply(null,e),e.length>0&&(t=Q(e[0]),t.startsWith("./")&&!n.startsWith("./")&&!n.startsWith("..")?n="./"+n:t.startsWith("//")&&!n.startsWith("//")&&(t.startsWith("//./")?n="//."+n:n="/"+n)),n},addExt:function(e,t){return t?(t[0]!=="."&&(t="."+t),e+(e.endsWith(t)?"":t)):e},trimExt:function(e,t,n){var r;return n==null&&(n=7),r=_.extname(e),St(r,t,n)?e.slice(0,+(e.length-r.length-1)+1||9e9):e},removeExt:function(e,t){return t?(t=t[0]==="."?t:"."+t,_.extname(e)===t?_.trimExt(e,[],t.length):e):e},changeExt:function(e,t,n,r){return r==null&&(r=7),_.trimExt(e,n,r)+(t?t[0]==="."?t:"."+t:"")},defaultExt:function(e,t,n,r){var o;return r==null&&(r=7),o=_.extname(e),St(o,n,r)?e:_.addExt(e,t)}};St=function(e,t,n){return t==null&&(t=[]),e&&e.length<=n&&ds.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(Z in je)if(ps.call(je,Z)){if(_r=je[Z],_[Z]!==void 0)throw new Error("path."+Z+" already exists.");_[Z]=_r}});var kr=v((wu,Ar)=>{Ar.exports=function(e,t){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var n=e.length;if(n<=1)return e;var r="";if(n>4&&e[3]==="\\"){var o=e[2];(o==="?"||o===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),r="//")}var i=e.split(/[/\\]+/);return t!==!1&&i[i.length-1]===""&&i.pop(),r+i.join("/")}});var mo=v((le,ne)=>{var xs=200,kt="__lodash_hash_undefined__",$e=1,Wr=2,zr=9007199254740991,Oe="[object Arguments]",Pt="[object Array]",bs="[object AsyncFunction]",Hr="[object Boolean]",Kr="[object Date]",Xr="[object Error]",Vr="[object Function]",ws="[object GeneratorFunction]",Ce="[object Map]",Jr="[object Number]",Ss="[object Null]",te="[object Object]",Nr="[object Promise]",vs="[object Proxy]",Yr="[object RegExp]",Ae="[object Set]",Zr="[object String]",Es="[object Symbol]",Ts="[object Undefined]",_t="[object WeakMap]",Qr="[object ArrayBuffer]",ke="[object DataView]",Ps="[object Float32Array]",_s="[object Float64Array]",js="[object Int8Array]",Is="[object Int16Array]",Os="[object Int32Array]",Cs="[object Uint8Array]",As="[object Uint8ClampedArray]",ks="[object Uint16Array]",Ns="[object Uint32Array]",Rs=/[\\^$.*+?()[\]{}|]/g,Fs=/^\[object .+?Constructor\]$/,$s=/^(?:0|[1-9]\d*)$/,w={};w[Ps]=w[_s]=w[js]=w[Is]=w[Os]=w[Cs]=w[As]=w[ks]=w[Ns]=!0;w[Oe]=w[Pt]=w[Qr]=w[Hr]=w[ke]=w[Kr]=w[Xr]=w[Vr]=w[Ce]=w[Jr]=w[te]=w[Yr]=w[Ae]=w[Zr]=w[_t]=!1;var eo=typeof global=="object"&&global&&global.Object===Object&&global,Bs=typeof self=="object"&&self&&self.Object===Object&&self,N=eo||Bs||Function("return this")(),to=typeof le=="object"&&le&&!le.nodeType&&le,Rr=to&&typeof ne=="object"&&ne&&!ne.nodeType&&ne,no=Rr&&Rr.exports===to,vt=no&&eo.process,Fr=function(){try{return vt&&vt.binding&&vt.binding("util")}catch{}}(),$r=Fr&&Fr.isTypedArray;function Gs(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}function Ms(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Ls(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Ds(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Us(e){return function(t){return e(t)}}function qs(e,t){return e.has(t)}function Ws(e,t){return e?.[t]}function zs(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Hs(e,t){return function(n){return e(t(n))}}function Ks(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Xs=Array.prototype,Vs=Function.prototype,Be=Object.prototype,Et=N["__core-js_shared__"],ro=Vs.toString,C=Be.hasOwnProperty,Br=function(){var e=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),oo=Be.toString,Js=RegExp("^"+ro.call(C).replace(Rs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=no?N.Buffer:void 0,Ne=N.Symbol,Mr=N.Uint8Array,io=Be.propertyIsEnumerable,Ys=Xs.splice,D=Ne?Ne.toStringTag:void 0,Lr=Object.getOwnPropertySymbols,Zs=Gr?Gr.isBuffer:void 0,Qs=Hs(Object.keys,Object),jt=re(N,"DataView"),de=re(N,"Map"),It=re(N,"Promise"),Ot=re(N,"Set"),Ct=re(N,"WeakMap"),pe=re(Object,"create"),ea=W(jt),ta=W(de),na=W(It),ra=W(Ot),oa=W(Ct),Dr=Ne?Ne.prototype:void 0,Tt=Dr?Dr.valueOf:void 0;function U(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ia(){this.__data__=pe?pe(null):{},this.size=0}function sa(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function aa(e){var t=this.__data__;if(pe){var n=t[e];return n===kt?void 0:n}return C.call(t,e)?t[e]:void 0}function ca(e){var t=this.__data__;return pe?t[e]!==void 0:C.call(t,e)}function ua(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pe&&t===void 0?kt:t,this}U.prototype.clear=ia;U.prototype.delete=sa;U.prototype.get=aa;U.prototype.has=ca;U.prototype.set=ua;function R(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function fa(){this.__data__=[],this.size=0}function la(e){var t=this.__data__,n=Ge(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ys.call(t,n,1),--this.size,!0}function da(e){var t=this.__data__,n=Ge(t,e);return n<0?void 0:t[n][1]}function pa(e){return Ge(this.__data__,e)>-1}function ma(e,t){var n=this.__data__,r=Ge(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}R.prototype.clear=fa;R.prototype.delete=la;R.prototype.get=da;R.prototype.has=pa;R.prototype.set=ma;function q(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ga(){this.size=0,this.__data__={hash:new U,map:new(de||R),string:new U}}function ha(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t}function ya(e){return Me(this,e).get(e)}function xa(e){return Me(this,e).has(e)}function ba(e,t){var n=Me(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}q.prototype.clear=ga;q.prototype.delete=ha;q.prototype.get=ya;q.prototype.has=xa;q.prototype.set=ba;function Re(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new q;++t<n;)this.add(e[t])}function wa(e){return this.__data__.set(e,kt),this}function Sa(e){return this.__data__.has(e)}Re.prototype.add=Re.prototype.push=wa;Re.prototype.has=Sa;function G(e){var t=this.__data__=new R(e);this.size=t.size}function va(){this.__data__=new R,this.size=0}function Ea(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ta(e){return this.__data__.get(e)}function Pa(e){return this.__data__.has(e)}function _a(e,t){var n=this.__data__;if(n instanceof R){var r=n.__data__;if(!de||r.length<xs-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new q(r)}return n.set(e,t),this.size=n.size,this}G.prototype.clear=va;G.prototype.delete=Ea;G.prototype.get=Ta;G.prototype.has=Pa;G.prototype.set=_a;function ja(e,t){var n=Fe(e),r=!n&&Ua(e),o=!n&&!r&&At(e),i=!n&&!r&&!o&&po(e),s=n||r||o||i,u=s?Ds(e.length,String):[],c=u.length;for(var a in e)(t||C.call(e,a))&&!(s&&(a=="length"||o&&(a=="offset"||a=="parent")||i&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||Ba(a,c)))&&u.push(a);return u}function Ge(e,t){for(var n=e.length;n--;)if(co(e[n][0],t))return n;return-1}function Ia(e,t,n){var r=t(e);return Fe(e)?r:Ms(r,n(e))}function ge(e){return e==null?e===void 0?Ts:Ss:D&&D in Object(e)?Fa(e):Da(e)}function Ur(e){return me(e)&&ge(e)==Oe}function so(e,t,n,r,o){return e===t?!0:e==null||t==null||!me(e)&&!me(t)?e!==e&&t!==t:Oa(e,t,n,r,so,o)}function Oa(e,t,n,r,o,i){var s=Fe(e),u=Fe(t),c=s?Pt:B(e),a=u?Pt:B(t);c=c==Oe?te:c,a=a==Oe?te:a;var f=c==te,p=a==te,l=c==a;if(l&&At(e)){if(!At(t))return!1;s=!0,f=!1}if(l&&!f)return i||(i=new G),s||po(e)?ao(e,t,n,r,o,i):Na(e,t,c,n,r,o,i);if(!(n&$e)){var m=f&&C.call(e,"__wrapped__"),d=p&&C.call(t,"__wrapped__");if(m||d){var y=m?e.value():e,g=d?t.value():t;return i||(i=new G),o(y,g,n,r,i)}}return l?(i||(i=new G),Ra(e,t,n,r,o,i)):!1}function Ca(e){if(!lo(e)||Ma(e))return!1;var t=uo(e)?Js:Fs;return t.test(W(e))}function Aa(e){return me(e)&&fo(e.length)&&!!w[ge(e)]}function ka(e){if(!La(e))return Qs(e);var t=[];for(var n in Object(e))C.call(e,n)&&n!="constructor"&&t.push(n);return t}function ao(e,t,n,r,o,i){var s=n&$e,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var a=i.get(e);if(a&&i.get(t))return a==t;var f=-1,p=!0,l=n&Wr?new Re:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var m=e[f],d=t[f];if(r)var y=s?r(d,m,f,t,e,i):r(m,d,f,e,t,i);if(y!==void 0){if(y)continue;p=!1;break}if(l){if(!Ls(t,function(g,x){if(!qs(l,x)&&(m===g||o(m,g,n,r,i)))return l.push(x)})){p=!1;break}}else if(!(m===d||o(m,d,n,r,i))){p=!1;break}}return i.delete(e),i.delete(t),p}function Na(e,t,n,r,o,i,s){switch(n){case ke:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Qr:return!(e.byteLength!=t.byteLength||!i(new Mr(e),new Mr(t)));case Hr:case Kr:case Jr:return co(+e,+t);case Xr:return e.name==t.name&&e.message==t.message;case Yr:case Zr:return e==t+"";case Ce:var u=zs;case Ae:var c=r&$e;if(u||(u=Ks),e.size!=t.size&&!c)return!1;var a=s.get(e);if(a)return a==t;r|=Wr,s.set(e,t);var f=ao(u(e),u(t),r,o,i,s);return s.delete(e),f;case Es:if(Tt)return Tt.call(e)==Tt.call(t)}return!1}function Ra(e,t,n,r,o,i){var s=n&$e,u=qr(e),c=u.length,a=qr(t),f=a.length;if(c!=f&&!s)return!1;for(var p=c;p--;){var l=u[p];if(!(s?l in t:C.call(t,l)))return!1}var m=i.get(e);if(m&&i.get(t))return m==t;var d=!0;i.set(e,t),i.set(t,e);for(var y=s;++p<c;){l=u[p];var g=e[l],x=t[l];if(r)var b=s?r(x,g,l,t,e,i):r(g,x,l,e,t,i);if(!(b===void 0?g===x||o(g,x,n,r,i):b)){d=!1;break}y||(y=l=="constructor")}if(d&&!y){var j=e.constructor,P=t.constructor;j!=P&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof P=="function"&&P instanceof P)&&(d=!1)}return i.delete(e),i.delete(t),d}function qr(e){return Ia(e,za,$a)}function Me(e,t){var n=e.__data__;return Ga(t)?n[typeof t=="string"?"string":"hash"]:n.map}function re(e,t){var n=Ws(e,t);return Ca(n)?n:void 0}function Fa(e){var t=C.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch{}var o=oo.call(e);return r&&(t?e[D]=n:delete e[D]),o}var $a=Lr?function(e){return e==null?[]:(e=Object(e),Gs(Lr(e),function(t){return io.call(e,t)}))}:Ha,B=ge;(jt&&B(new jt(new ArrayBuffer(1)))!=ke||de&&B(new de)!=Ce||It&&B(It.resolve())!=Nr||Ot&&B(new Ot)!=Ae||Ct&&B(new Ct)!=_t)&&(B=function(e){var t=ge(e),n=t==te?e.constructor:void 0,r=n?W(n):"";if(r)switch(r){case ea:return ke;case ta:return Ce;case na:return Nr;case ra:return Ae;case oa:return _t}return t});function Ba(e,t){return t=t??zr,!!t&&(typeof e=="number"||$s.test(e))&&e>-1&&e%1==0&&e<t}function Ga(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ma(e){return!!Br&&Br in e}function La(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Be;return e===n}function Da(e){return oo.call(e)}function W(e){if(e!=null){try{return ro.call(e)}catch{}try{return e+""}catch{}}return""}function co(e,t){return e===t||e!==e&&t!==t}var Ua=Ur(function(){return arguments}())?Ur:function(e){return me(e)&&C.call(e,"callee")&&!io.call(e,"callee")},Fe=Array.isArray;function qa(e){return e!=null&&fo(e.length)&&!uo(e)}var At=Zs||Ka;function Wa(e,t){return so(e,t)}function uo(e){if(!lo(e))return!1;var t=ge(e);return t==Vr||t==ws||t==bs||t==vs}function fo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zr}function lo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function me(e){return e!=null&&typeof e=="object"}var po=$r?Us($r):Aa;function za(e){return qa(e)?ja(e):ka(e)}function Ha(){return[]}function Ka(){return!1}ne.exports=Wa});var wo=v((Eu,Nt)=>{"use strict";var bo=require("module"),Xa=require("path");Nt.exports=function(t,n,r){if(typeof n=="object"&&(r=n,n=void 0),r=r||{},n=n||"",r.appendPaths=r.appendPaths||[],r.prependPaths=r.prependPaths||[],typeof t!="string")throw new Error("code must be a string, not "+typeof t);var o=bo._nodeModulePaths(Xa.dirname(n)),i=Nt.parent,s=new bo(n,i);s.filename=n,s.paths=[].concat(r.prependPaths).concat(o).concat(r.appendPaths),s._compile(t,n);var u=s.exports;return i&&i.children&&i.children.splice(i.children.indexOf(s),1),u}});var Bt=require("commander"),Uo=h(require("path"));var Dt=require("commander"),Ut=h(require("fast-glob")),De=h(require("fs-extra")),qt=h(require("path")),k=h(require("@techor/log"));var Lt=h(require("fs-extra"));function z(e="./package.json"){return Lt.default.readJSONSync(e,{throws:!1})||{}}var Vo=z(),Jo={workspaces:Vo.workspaces};Dt.program.command("version <version>").description("Bump to specific version for workspace's packages").option("-p, --prefix <symbol>","Version prefix `^`, `~`, `>`, `>=`, `<`, `<=` ","^").option("-w, --workspaces <paths>","Specific your workspaces",Jo.workspaces).option("-ls, --list","List current bumpable dependency tree in workspaces",!1).action((e,{prefix:t,list:n,workspaces:r})=>{let o=t+e,i={},s={},u=r.map(f=>qt.default.join(f,"*package.json")),c=(f,p)=>{let l=!1;for(let m in f)m in s&&f[m]===""&&(f[m]=o,l=!0);return l};for(let f of Ut.default.sync(u)){let p=De.default.readJSONSync(f);p.private||(i[f]=p,s[p.name]=p,p.version=e)}for(let f in i){let p=i[f],{dependencies:l,peerDependencies:m}=i[f];l&&c(l,"dependencies"),m&&c(m,"peerDependencies"),n||De.default.writeJSONSync(f,p)}let a={};for(let f in s){let{dependencies:p,peerDependencies:l}=s[f],m=a[(0,k.paint)("**"+f+"**")]={},d=(y,g)=>{if(y){m[g]={};for(let x in y)if(x in s){let b=y[x];m[g][(0,k.paint)("**"+x+"**")]=b===o?null:o}}};d(p,"dependencies"),d(l,"peerDependencies"),Object.keys(a[(0,k.paint)("**"+f+"**")]).length||(a[(0,k.paint)("**"+f+"**")]=null)}k.default`📦`,k.default.tree(a),k.default.success`bump version to +${o}+ for ${Object.keys(s).length} packages in all workspace`});var Bo=require("commander"),Go=h(require("fast-glob"));var xr=require("node:buffer"),br=h(require("node:path"),1),ft=h(require("node:child_process"),1),ae=h(require("node:process"),1),wr=h(kn(),1);function Ye(e){let t=typeof e=="string"?`
3
- `:`
4
- `.charCodeAt(),n=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}var oe=h(require("node:process"),1),X=h(require("node:path"),1),Nn=h(require("node:url"),1);function be(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}function Ei(e={}){let{cwd:t=oe.default.cwd(),path:n=oe.default.env[be()],execPath:r=oe.default.execPath}=e,o,i=t instanceof URL?Nn.default.fileURLToPath(t):t,s=X.default.resolve(i),u=[];for(;o!==s;)u.push(X.default.join(s,"node_modules/.bin")),o=s,s=X.default.resolve(s,"..");return u.push(X.default.resolve(i,r,"..")),[...u,n].join(X.default.delimiter)}function Rn({env:e=oe.default.env,...t}={}){e={...e};let n=be({env:e});return t.path=e[n],e[n]=Ei(t),e}var Ti=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!Pi(o,i)&&r||Object.defineProperty(e,n,i)},Pi=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},_i=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},ji=(e,t)=>`/* Wrapped ${e}*/
5
- ${t}`,Ii=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Oi=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Ci=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=ji.bind(null,r,t.toString());Object.defineProperty(o,"name",Oi),Object.defineProperty(e,"toString",{...Ii,value:o})};function Ze(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))Ti(e,t,o,n);return _i(e,t),Ci(e,t,r),e}var we=new WeakMap,Fn=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(we.set(i,++r),r===1)n=e.apply(this,s),e=null;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return Ze(i,e),we.set(i,r),i};Fn.callCount=e=>{if(!we.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return we.get(e)};var $n=Fn;var Dn=require("os");var Bn=function(){let e=Qe-Gn+1;return Array.from({length:e},Ai)},Ai=function(e,t){return{name:`SIGRT${t+1}`,number:Gn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},Gn=34,Qe=64;var Ln=require("os");var Mn=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var et=function(){let e=Bn();return[...Mn,...e].map(ki)},ki=function({name:e,number:t,description:n,action:r,forced:o=!1,standard:i}){let{signals:{[e]:s}}=Ln.constants,u=s!==void 0;return{name:e,number:u?s:t,description:n,supported:u,action:r,forced:o,standard:i}};var Ni=function(){return et().reduce(Ri,{})},Ri=function(e,{name:t,number:n,description:r,supported:o,action:i,forced:s,standard:u}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:i,forced:s,standard:u}}},Un=Ni(),Fi=function(){let e=et(),t=64+1,n=Array.from({length:t},(r,o)=>$i(o,e));return Object.assign({},...n)},$i=function(e,t){let n=Bi(e,t);if(n===void 0)return{};let{name:r,description:o,supported:i,action:s,forced:u,standard:c}=n;return{[e]:{name:r,number:e,description:o,supported:i,action:s,forced:u,standard:c}}},Bi=function(e,t){let n=t.find(({name:r})=>Dn.constants.signals[r]===e);return n!==void 0?n:t.find(r=>r.number===e)},Nc=Fi();var Gi=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":n!==void 0?`failed with ${n}`:r!==void 0?`was killed with ${r} (${o})`:i!==void 0?`failed with exit code ${i}`:"failed",tt=({stdout:e,stderr:t,all:n,error:r,signal:o,exitCode:i,command:s,escapedCommand:u,timedOut:c,isCanceled:a,killed:f,parsed:{options:{timeout:p}}})=>{i=i===null?void 0:i,o=o===null?void 0:o;let l=o===void 0?void 0:Un[o].description,m=r&&r.code,y=`Command ${Gi({timedOut:c,timeout:p,errorCode:m,signal:o,signalDescription:l,exitCode:i,isCanceled:a})}: ${s}`,g=Object.prototype.toString.call(r)==="[object Error]",x=g?`${y}
6
- ${r.message}`:y,b=[x,t,e].filter(Boolean).join(`
7
- `);return g?(r.originalMessage=r.message,r.message=b):r=new Error(b),r.shortMessage=x,r.command=s,r.escapedCommand=u,r.exitCode=i,r.signal=o,r.signalDescription=l,r.stdout=e,r.stderr=t,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=a,r.killed=f&&!c,r};var Se=["stdin","stdout","stderr"],Mi=e=>Se.some(t=>e[t]!==void 0),qn=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return Se.map(r=>e[r]);if(Mi(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Se.map(r=>`\`${r}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let n=Math.max(t.length,Se.length);return Array.from({length:n},(r,o)=>t[o])};var Jn=h(require("node:os"),1),Yn=h(Vn(),1),Li=1e3*5,Zn=(e,t="SIGTERM",n={})=>{let r=e(t);return Di(e,t,n,r),r},Di=(e,t,n,r)=>{if(!Ui(t,n,r))return;let o=Wi(n),i=setTimeout(()=>{e("SIGKILL")},o);i.unref&&i.unref()},Ui=(e,{forceKillAfterTimeout:t},n)=>qi(e)&&t!==!1&&n,qi=e=>e===Jn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Wi=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return Li;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Qn=(e,t)=>{e.kill()&&(t.isCanceled=!0)},zi=(e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},er=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===void 0)return r;let o,i=new Promise((u,c)=>{o=setTimeout(()=>{zi(e,n,c)},t)}),s=r.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},tr=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},nr=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let o=(0,Yn.default)(()=>{e.kill()});return r.finally(()=>{o()})};function rr(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}var at=h(sr(),1),ur=h(cr(),1),fr=(e,t)=>{t===void 0||e.stdin===void 0||(rr(t)?t.pipe(e.stdin):e.stdin.end(t))},lr=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,ur.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},it=async(e,t)=>{if(e){e.destroy();try{return await t}catch(n){return n.bufferedData}}},st=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!(!e||!n))return t?(0,at.default)(e,{encoding:t,maxBuffer:r}):at.default.buffer(e,{maxBuffer:r})},dr=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:o,maxBuffer:i},s)=>{let u=st(e,{encoding:r,buffer:o,maxBuffer:i}),c=st(t,{encoding:r,buffer:o,maxBuffer:i}),a=st(n,{encoding:r,buffer:o,maxBuffer:i*2});try{return await Promise.all([s,u,c,a])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},it(e,u),it(t,c),it(n,a)])}};var Qi=(async()=>{})().constructor.prototype,es=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Qi,e)]),ct=(e,t)=>{for(let[n,r]of es){let o=typeof t=="function"?(...i)=>Reflect.apply(r.value,t(),i):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}return e},pr=e=>new Promise((t,n)=>{e.on("exit",(r,o)=>{t({exitCode:r,signal:o})}),e.on("error",r=>{n(r)}),e.stdin&&e.stdin.on("error",r=>{n(r)})});var mr=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],ts=/^[\w.-]+$/,ns=/"/g,rs=e=>typeof e!="string"||ts.test(e)?e:`"${e.replace(ns,'\\"')}"`,gr=(e,t)=>mr(e,t).join(" "),hr=(e,t)=>mr(e,t).map(n=>rs(n)).join(" "),os=/ +/g,yr=e=>{let t=[];for(let n of e.trim().split(os)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var is=1e3*1e3*100,ss=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{let i=t?{...ae.default.env,...e}:e;return n?Rn({env:i,cwd:r,execPath:o}):i},as=(e,t,n={})=>{let r=wr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:is,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||ae.default.cwd(),execPath:ae.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=ss(n),n.stdio=qn(n),ae.default.platform==="win32"&&br.default.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},ut=(e,t,n)=>typeof t!="string"&&!xr.Buffer.isBuffer(t)?n===void 0?void 0:"":e.stripFinalNewline?Ye(t):t;function cs(e,t,n){let r=as(e,t,n),o=gr(e,t),i=hr(e,t);tr(r.options);let s;try{s=ft.default.spawn(r.file,r.args,r.options)}catch(m){let d=new ft.default.ChildProcess,y=Promise.reject(tt({error:m,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return ct(d,y)}let u=pr(s),c=er(s,r.options,u),a=nr(s,r.options,c),f={isCanceled:!1};s.kill=Zn.bind(null,s.kill.bind(s)),s.cancel=Qn.bind(null,s,f);let l=$n(async()=>{let[{error:m,exitCode:d,signal:y,timedOut:g},x,b,j]=await dr(s,r.options,a),P=ut(r.options,x),I=ut(r.options,b),ye=ut(r.options,j);if(m||d!==0||y!==null){let Gt=tt({error:m,exitCode:d,signal:y,stdout:P,stderr:I,all:ye,command:o,escapedCommand:i,parsed:r,timedOut:g,isCanceled:f.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:s.killed});if(!r.options.reject)return Gt;throw Gt}return{command:o,escapedCommand:i,exitCode:0,stdout:P,stderr:I,all:ye,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return fr(s,r.options.input),s.all=lr(s,r.options),ct(s,l)}function Sr(e,t){let[n,...r]=yr(e);return cs(n,r,t)}var Mo=require("esbuild");function lt(e,t=1,n={}){let{indent:r=" ",includeEmptyLines:o=!1}=n;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof r!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(t===0)return e;let i=o?/^/gm:/^(?!\s*$)/gm;return e.replace(i,r.repeat(t))}var pt=h(require("os"),1);function dt(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var vr=/\s+at.*[(\s](.*)\)?/,us=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,fs=typeof pt.default.homedir>"u"?"":pt.default.homedir().replace(/\\/g,"/");function mt(e,{pretty:t=!1,basePath:n}={}){let r=n&&new RegExp(`(at | \\()${dt(n.replace(/\\/g,"/"))}`,"g");if(typeof e=="string")return e.replace(/\\/g,"/").split(`
8
- `).filter(o=>{let i=o.match(vr);if(i===null||!i[1])return!0;let s=i[1];return s.includes(".app/Contents/Resources/electron.asar")||s.includes(".app/Contents/Resources/default_app.asar")||s.includes("node_modules/electron/dist/resources/electron.asar")||s.includes("node_modules/electron/dist/resources/default_app.asar")?!1:!us.test(s)}).filter(o=>o.trim()!=="").map(o=>(r&&(o=o.replace(r,"$1")),t&&(o=o.replace(vr,(i,s)=>i.replace(s,s.replace(fs,"~")))),o)).join(`
9
- `)}var ls=e=>e.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""),ce=class extends Error{#e;name="AggregateError";constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);t=t.map(r=>r instanceof Error?r:r!==null&&typeof r=="object"?Object.assign(new Error(r.message),r):new Error(r));let n=t.map(r=>typeof r.stack=="string"&&r.stack.length>0?ls(mt(r.stack)):String(r)).join(`
10
- `);n=`
11
- `+lt(n,4),super(n),this.#e=t}get errors(){return this.#e.slice()}};var gt=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}},Er=e=>globalThis.DOMException===void 0?new gt(e):new DOMException(e),Tr=e=>{let t=e.reason===void 0?Er("This operation was aborted."):e.reason;return t instanceof Error?t:Er(t)};async function ht(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:o}={}){return new Promise((i,s)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let u=[],c=[],a=new Map,f=!1,p=!1,l=!1,m=0,d=0,y=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=b=>{f=!0,p=!0,s(b)};o&&(o.aborted&&g(Tr(o)),o.addEventListener("abort",()=>{g(Tr(o))}));let x=async()=>{if(p)return;let b=await y.next(),j=d;if(d++,b.done){if(l=!0,m===0&&!p){if(!r&&c.length>0){g(new ce(c));return}if(p=!0,a.size===0){i(u);return}let P=[];for(let[I,ye]of u.entries())a.get(I)!==Pr&&P.push(ye);i(P)}return}m++,(async()=>{try{let P=await b.value;if(p)return;let I=await t(P,j);I===Pr&&a.set(j,I),u[j]=I,m--,await x()}catch(P){if(r)g(P);else{c.push(P),m--;try{await x()}catch(I){g(I)}}}})()};(async()=>{for(let b=0;b<n;b++){try{await x()}catch(j){g(j);break}if(l||f)break}})()})}var Pr=Symbol("skip");async function yt(e,t){return ht(e,n=>n(),t)}var O=h(require("@techor/log")),$=h(ee());var he=h(require("to-line"));var ms=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],gs=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],hs=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],ys=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Cr=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Ie(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,...t};let n=t.bits?t.binary?ys:hs:t.binary?gs:ms;if(t.signed&&e===0)return` 0 ${n[0]}`;let r=e<0,o=r?"-":t.signed?"+":"";r&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){let a=Cr(e,t.locale,i);return o+a+" "+n[0]}let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,i||(e=e.toPrecision(3));let u=Cr(Number(e),t.locale,i),c=n[s];return o+u+" "+c}var Lo=h(kr()),Ft=h(require("fs")),Do=h(mo());var go=["sourcemap","legalComments","sourceRoot","sourcesContent","format","globalName","target","supported","platform","mangleProps","reserveProps","mangleQuoted","mangleCache","drop","minify","minifyWhitespace","minifyIdentifiers","minifySyntax","charset","treeShaking","ignoreAnnotations","jsx","jsxFactory","jsxFragment","jsxImportSource","jsxDev","jsxSideEffects","define","pure","keepNames","color","logLevel","logLimit","logOverride","bundle","splitting","preserveSymlinks","outfile","metafile","outdir","outbase","external","packages","alias","loader","resolveExtensions","mainFields","conditions","write","allowOverwrite","tsconfig","outExtension","publicPath","entryNames","chunkNames","assetNames","inject","banner","footer","incremental","entryPoints","stdin","plugins","absWorkingDir","nodePaths","watch"];var ho=h(require("fs")),yo=h(require("fast-glob")),F=h(ee());function xo(e=".js",t="src"){let n=F.default.resolve(t);return{name:"fill-module-ext",setup(r){let o={};o.promise=new Promise(i=>{o.resolve=i}),r.onStart(()=>{o.resolve(!0)}),r.onLoad({filter:/\.(?:ts|tsx|js|jsx|mjs|mts)$/},async i=>{if(await o.promise===!0){let s=await ho.default.promises.readFile(i.path,{encoding:"utf8"}),u=F.default.dirname(i.path);return{contents:s.replace(/((?:(?:import|export)(?:.*from | ))|(?:(?:import))\()'((\.(?:\.)?\/.*)|\.)'/gmi,(...c)=>{let a=c[2],f=F.default.parse(a);if(f.ext)return c[1];let p=F.default.resolve(u,a),l=yo.default.sync([p+".{ts,js,mjs,jsx,tsx,mjs,mts}",F.default.join(p,"index.{ts,js,mjs,jsx,tsx,mjs,mts}")])[0];if(!l)return c[0];let m=F.default.relative(n,F.default.changeExt(l,e)),d=F.default.parse(m);return a==="."||a==="./"?m="./index"+e:d.name===f.name?m=a+e:m=a+"/index"+e,`${c[1]}'${m}'`}),loader:"tsx"}}})}}}var ko=h(ee(),1),Le=h(require("@techor/log"),1),No=h(require("fast-glob"),1);var Rt=h(ee(),1),Io=h(wo(),1),Oo=h(require("fast-glob"),1);function vo(e){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&e instanceof t||e instanceof Date||e instanceof RegExp)}function Eo(e){if(typeof Buffer<"u"&&Buffer&&e instanceof Buffer){let t=Buffer.alloc(e.length);return e.copy(t),t}else{if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}}function To(e){let t=[];return e.forEach(function(n,r){typeof n=="object"&&n!==null?Array.isArray(n)?t[r]=To(n):vo(n)?t[r]=Eo(n):t[r]=A({},n):t[r]=n}),t}function So(e,t){return t==="__proto__"?void 0:e[t]}function A(...e){let t={},n,r;return e.forEach(function(o){typeof o!="object"||o===null||Array.isArray(o)||Object.keys(o).forEach(function(i){if(r=So(t,i),n=So(o,i),n!==t)if(typeof n!="object"||n===null){t[i]=n;return}else if(Array.isArray(n)){t[i]=To(n);return}else if(vo(n)){t[i]=Eo(n);return}else if(typeof r!="object"||r===null||Array.isArray(r)){t[i]=A({},n);return}else{t[i]=A(r,n);return}})}),t}var Co=require("esbuild");var Po=h(require("fs-extra"),1),_o=h(ee(),1);function jo(e="./package.json",{cwd:t=process.cwd()}={}){return Po.default.readJSONSync(t?_o.default.resolve(t,e):e,{throws:!1})}function Ao(e,t,n){t=A({cwd:process.cwd()},t);let r=jo(void 0,{cwd:t.cwd}),{dependencies:o,peerDependencies:i,devDependencies:s}=r||{},u=[];if(o&&u.push(...Object.keys(o)),i&&u.push(...Object.keys(i)),s&&u.push(...Object.keys(s)),!e)return;let c=Oo.default.sync(e,t)[0];if(!c)return;let a=Rt.default.resolve(t.cwd,c),f=(0,Co.buildSync)(A({entryPoints:[a],logLevel:process.env.NODE_ENV==="test"?"debug":"silent",bundle:!0,format:"cjs",write:!1,target:"esnext",platform:"node",external:u},n)),{text:p}=f.outputFiles[0];return(0,Io.default)(p,Rt.default.changeExt(a,".js"))}var Va={cwd:process.cwd()},Ja=Va,Ro=class{options;constructor(...e){this.options=A(Ja,...e)}logConfigFound=e=>Le.default.ok`**${e}** config file found`;logConfigNotFound=e=>Le.default.i`No **${e}** config file found`;readConfig(e="config"){let{config:t,cwd:n}=this.options;if(typeof t=="object")return t;let r;try{let o=this.configPath;if(o){let i=Ao(o,{cwd:n});r=(e?i[e]:void 0)||i.default||i,this.logConfigFound(o)}else this.logConfigNotFound(t)}catch(o){Le.default.error(o)}return r}get configPath(){let{cwd:e,config:t}=this.options;if(!(!t||typeof t!="string"))return No.default.sync(t,{cwd:e})[0]}get resolvedConfigPath(){let e=this.configPath;return e?ko.default.resolve(this.options.cwd,e):""}};var Ya=new Ro({config:"aron.{js,ts,cjs,mjs}"}),Za={js:"cjs",cjs:"cjs",mjs:"esm",css:"css"},E=z(),{dependencies:Fo,peerDependencies:$o}=E,$t=[];Fo&&$t.push(...Object.keys(Fo));$o&&$t.push(...Object.keys($o));Bo.program.command("pack [entryPaths...]").option("-f, --format [formats...]","The output format for the generated JavaScript files `iife`, `cjs`, `esm`",["cjs","esm"]).option("-t, --shakable-format [formats...]","Tree-shakable module's formats",["cjs","esm"]).option("--shakable","Enable outputting tree-shakable modules",!1).option("-w, --watch","Rebuild whenever a file changes",!1).option("-s, --sourcemap","Emit a source map",process.env.NODE_ENV==="production").option("-p, --platform <node,browser,neutral>","Platform target","browser").option("-t, --type","Emit typescript declarations",E.types).option("-o, --outdir <dir>","The output directory for the build operation","dist").option("-o, --serve","Serve mode starts a web server that serves your code to your browser on your device",!1).option("-e, --external <packages...>","External packages to exclude from the build",$t).option("-ee, --extra-external <packages...>","Extra external packages to exclude from the build",[]).option("-re, --resolve-extensions [extensions...]","The resolution algorithm used by node supports implicit file extensions",[".tsx",".ts",".jsx",".js",".css",".json"]).option("-kn, --keep-names","Keep JavaScript function/class names",!1).option("--cjs-ext <ext>","Specify CommonJS default file extension",".js").option("--iife-ext <ext>","Specify CommonJS default file extension",".js").option("--esm-ext <ext>","Specify CommonJS default file extension",".mjs").option("--srcdir <dir>","The source directory","src").option("--target","This sets the target environment for the generated JavaScript and/or CSS code.","esnext").option("--mangle-props","Pass a regular expression to esbuild to tell esbuild to automatically rename all properties that match this regular expression","^_").option("--no-bundle","OFF: Inline any imported dependencies into the file itself",!0).option("--no-minify","OFF: Minify the generated code").option("--no-clean","OFF: Clean up the previous output directory before the build starts").action(async function(e,t,n){t.clean&&Ft.default.existsSync(t.outdir)&&(Ft.default.rmSync(t.outdir,{force:!0,recursive:!0}),console.log(""),O.default.d`Cleaned up the **${t.outdir}** output directory`);let r=Ya.readConfig(null),o=[],i=(c,a)=>{let f=$.default.relative(t.outdir,c),p=$.default.join(t.srcdir,f);return $.default.changeExt(p,a)},s=async(c,a)=>{let f=a.format==="css",p=a.ext||a.outFile&&$.default.extname(a.outFile)||void 0,l=[...t.external,...t.extraExternal],m=a.outdir||t.outdir;t.bundle&&a.softBundle&&l.push(".*");let d=A(t,{outExtension:f?{".css":".css"}:{".js":p||{cjs:t.cjsExt,esm:t.esmExt,iife:t.iifeExt}[a.format]},logLevel:"info",outdir:m,outbase:t.srcdir,platform:a.platform||t.platform,metafile:!0,format:f?void 0:a.format,keepNames:t.keepNames,resolveExtensions:t.resolveExtensions,mangleProps:t.mangleProps?new RegExp(t.mangleProps):void 0,target:t.target,sourcemap:t.sourcemap,external:l,plugins:[]},r?.pack);t.bundle||delete d.external,a.softBundle&&a.format==="esm"&&d.plugins.push(xo(t.esmExt)),delete d.watch,delete d.serve;for(let g in d)go.includes(g)||delete d[g];d.entryPoints=Go.default.sync([...new Set(c)].map(g=>(0,Lo.default)(g))).filter(g=>!o.find(x=>x.options.entryPoints.includes(g)&&x.options.format===d.format&&(0,Do.default)(x.options.outExtension,d.outExtension)&&x.options.outdir===d.outdir));let y={options:d,run:async()=>{let g=await(0,Mo.context)(d),{metafile:x}=await g.rebuild();if(x){console.log(""),y.metafile=x;for(let b in x.outputs){let j=x.outputs[b],P=Ie(j.bytes).replace(/ /g,""),I=x.outputs[b].format=a.format;O.default`${O.chalk.dim("\u2502")} $t [${I}] **${b}** ${P} (${Object.keys(j.inputs).length} inputs)`}O.default.tree({entries:d.entryPoints,external:d.external,outdir:d.outdir,format:d.format,platform:d.platform,[Object.keys(d).filter(b=>d[b]===!0).map(b=>O.chalk.green("\u2713 ")+b).join(", ")]:null})}t.watch?await g.watch():await g.dispose(),t.serve&&await g.serve()}};d.entryPoints.length&&o.push(y)};if(t.shakable&&t.shakableFormat.length&&t.shakableFormat.forEach(c=>s([$.default.join(t.srcdir,"**/*.{js,ts,jsx,tsx,mjs,mts}")],{format:c,platform:"node",outdir:$.default.join(t.outdir,c),softBundle:!0})),e.length){let c=e.filter(f=>f.includes(".css")),a=e.filter(f=>!f.includes(".css"));c.length&&s(c,{format:"css"}),a.length&&t.format.forEach(f=>s(a,{format:f}))}else if(E.exports&&function c(a,f,p){if(typeof a=="string"){let l=$.default.extname(a);s([i(a,".{js,ts,jsx,tsx,mjs,mts}")],{format:p.format||Za[l],outFile:p.outFile||a,platform:p.platform})}else for(let l in a){let m=a[l],d,y;switch(f){case"node":y="node";break;case"browser":y="browser";break;case"require":d="cjs";break;case"import":d="esm";break}if(l.startsWith("."))c(m,l);else switch(l){case"node":c(m,l,{platform:"node",format:d});break;case"browser":c(m,l,{platform:"browser",format:d});break;case"default":c(m,l,{platform:y,format:d});break;case"require":c(m,l,{platform:y,format:"cjs"});break;case"import":c(m,l,{platform:y,format:"esm"});break}}}(E.exports,""),E.style&&s([i(E.main,".css")],{format:"css"}),E.main&&!E.main.endsWith(".css")&&s([i(E.main,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",outFile:E.main}),E.module&&s([i(E.module,".{js,ts,jsx,tsx,mjs,mts}")],{format:"esm",outFile:E.module}),E.browser&&s([i(E.browser,".{js,ts,jsx,tsx,mjs,mts}")],{format:"iife",platform:"browser",outFile:E.browser}),E.bin)if(typeof E.bin=="string")s([i(E.bin,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:E.bin});else for(let c in E.bin){let a=E.bin[c];s([i(a,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:a})}o.length||t.format.map(c=>s([$.default.join(t.srcdir,"index.ts")],{format:c}));let u;t.type&&(u={outFile:"declarations",options:{platform:"type",format:"dts"},run:()=>new Promise(c=>{let a=()=>Sr(he.default`
12
- npx tsc --emitDeclarationOnly --preserveWatchOutput --declaration
13
- --outDir ${t.outdir}
14
- ${t.watch&&"--watch"}
15
- `,{stdio:"inherit",stripFinalNewline:!1}).catch(f=>{process.exit()}).finally(c);t.watch?setTimeout(a,100):a()})},t.watch||o.push(u)),await yt(o.map(({run:c})=>c)),console.log(""),t.watch&&u&&o.push(u);for(let c of o)c.metafile?Object.keys(c.metafile.outputs).forEach(a=>{let f=c.metafile.outputs[a],p=Ie(f.bytes).replace(/ /g,""),l=f.format;O.default.ok(he.l`[${c.options.platform}] **${a}** ${p} (${l})`)}):O.default.ok(he.l`[${c.options.format}] **${c.outFile}** (${c.options.format})`);console.log(""),t.watch?O.default`Start watching ${o.length} build tasks`:O.default.success`${o.length} build tasks`,console.log(""),t.watch&&u&&await u.run()});var{version:Qa,name:ec,description:tc}=z(Uo.default.join(__dirname,"../../package.json"));Bt.program.name(ec).description(tc).version(Qa);Bt.program.parse();
16
- /*! Bundled license information:
17
-
18
- normalize-path/index.js:
19
- (*!
20
- * normalize-path <https://github.com/jonschlinkert/normalize-path>
21
- *
22
- * Copyright (c) 2014-2018, Jon Schlinkert.
23
- * Released under the MIT License.
24
- *)
25
- */
26
- //# sourceMappingURL=index.map