Initial commit

This commit is contained in:
Spencer Pincott
2024-07-15 22:20:13 -04:00
commit 97737ca1ae
16618 changed files with 934131 additions and 0 deletions

21
themes/keepit/node_modules/husky/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 typicode
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

38
themes/keepit/node_modules/husky/README.md generated vendored Normal file
View File

@@ -0,0 +1,38 @@
# husky
> Modern native Git hooks made easy
Husky improves your commits and more 🐶 *woof!*
# Install
```
npm install husky --save-dev
```
# Usage
Edit `package.json > prepare` script and run it once:
```sh
npm set-script prepare "husky install"
npm run prepare
```
Add a hook:
```sh
npx husky add .husky/pre-commit "npm test"
git add .husky/pre-commit
```
Make a commit:
```sh
git commit -m "Keep calm and commit"
# `npm test` will run
```
# Documentation
https://typicode.github.io/husky

31
themes/keepit/node_modules/husky/husky.sh generated vendored Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/sh
if [ -z "$husky_skip_init" ]; then
debug () {
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}
readonly hook_name="$(basename "$0")"
debug "starting $hook_name..."
if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi
if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi
export readonly husky_skip_init=1
sh -e "$0" "$@"
exitCode="$?"
if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
fi
exit $exitCode
fi

2
themes/keepit/node_modules/husky/lib/bin.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env node
export {};

30
themes/keepit/node_modules/husky/lib/bin.js generated vendored Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const p = require("path");
const h = require("./");
function help(code) {
console.log(`Usage:
husky install [dir] (default: .husky)
husky uninstall
husky set|add <file> [cmd]`);
process.exit(code);
}
const [, , cmd, ...args] = process.argv;
const ln = args.length;
const [x, y] = args;
const hook = (fn) => () => !ln || ln > 2 ? help(2) : fn(x, y);
const cmds = {
install: () => (ln > 1 ? help(2) : h.install(x)),
uninstall: h.uninstall,
set: hook(h.set),
add: hook(h.add),
['-v']: () => console.log(require(p.join(__dirname, '../package.json')).version),
};
try {
cmds[cmd] ? cmds[cmd]() : help(0);
}
catch (e) {
console.error(e.message);
process.exit(1);
}

4
themes/keepit/node_modules/husky/lib/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export declare function install(dir?: string): void;
export declare function set(file: string, cmd: string): void;
export declare function add(file: string, cmd: string): void;
export declare function uninstall(): void;

62
themes/keepit/node_modules/husky/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.uninstall = exports.add = exports.set = exports.install = void 0;
const cp = require("child_process");
const fs = require("fs");
const p = require("path");
const l = (msg) => console.log(`husky - ${msg}`);
const git = (args) => cp.spawnSync('git', args, { stdio: 'inherit' });
function install(dir = '.husky') {
if (git(['rev-parse']).status !== 0) {
return;
}
const url = 'https://git.io/Jc3F9';
if (!p.resolve(process.cwd(), dir).startsWith(process.cwd())) {
throw new Error(`.. not allowed (see ${url})`);
}
if (!fs.existsSync('.git')) {
throw new Error(`.git can't be found (see ${url})`);
}
try {
fs.mkdirSync(p.join(dir, '_'), { recursive: true });
fs.writeFileSync(p.join(dir, '_/.gitignore'), '*');
fs.copyFileSync(p.join(__dirname, '../husky.sh'), p.join(dir, '_/husky.sh'));
const { error } = git(['config', 'core.hooksPath', dir]);
if (error) {
throw error;
}
}
catch (e) {
l('Git hooks failed to install');
throw e;
}
l('Git hooks installed');
}
exports.install = install;
function set(file, cmd) {
const dir = p.dirname(file);
if (!fs.existsSync(dir)) {
throw new Error(`can't create hook, ${dir} directory doesn't exist (try running husky install)`);
}
fs.writeFileSync(file, `#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
${cmd}
`, { mode: 0o0755 });
l(`created ${file}`);
}
exports.set = set;
function add(file, cmd) {
if (fs.existsSync(file)) {
fs.appendFileSync(file, `${cmd}\n`);
l(`updated ${file}`);
}
else {
set(file, cmd);
}
}
exports.add = add;
function uninstall() {
git(['config', '--unset', 'core.hooksPath']);
}
exports.uninstall = uninstall;

40
themes/keepit/node_modules/husky/package.json generated vendored Normal file
View File

@@ -0,0 +1,40 @@
{
"name": "husky",
"version": "7.0.4",
"description": "Modern native Git hooks made easy",
"keywords": [
"git",
"hooks",
"pre-commit"
],
"homepage": "https://typicode.github.io/husky",
"repository": "typicode/husky",
"funding": "https://github.com/sponsors/typicode",
"license": "MIT",
"author": "Typicode <typicode@gmail.com>",
"bin": "lib/bin.js",
"main": "lib/index.js",
"files": [
"lib",
"husky.sh"
],
"scripts": {
"build": "tsc",
"test": "sh test/all.sh",
"lint": "eslint src --ext .ts",
"serve": "docsify serve docs",
"prepare": "npm run build && node lib/bin install"
},
"devDependencies": {
"@commitlint/cli": "^12.0.1",
"@commitlint/config-conventional": "^12.0.1",
"@tsconfig/node12": "^1.0.7",
"@types/node": "^15.3.1",
"@typicode/eslint-config": "^0.1.2",
"docsify-cli": "^4.4.3",
"typescript": "^4.2.3"
},
"engines": {
"node": ">=12"
}
}