bun-git-hooks 0.1.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.
- package/README.md +202 -0
- package/dist/cli.js +1082 -0
- package/dist/config.d.ts +4 -0
- package/dist/git-hooks.d.ts +50 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +831 -0
- package/dist/types.d.ts +43 -0
- package/package.json +92 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Buffer } from 'node:buffer';
|
|
2
|
+
|
|
3
|
+
export declare interface RawImageData<T> {
|
|
4
|
+
width: number
|
|
5
|
+
height: number
|
|
6
|
+
data: T
|
|
7
|
+
}
|
|
8
|
+
export declare interface BufferRet {
|
|
9
|
+
data: Buffer | Uint8ClampedArray
|
|
10
|
+
width: number
|
|
11
|
+
height: number
|
|
12
|
+
exifBuffer?: ArrayBuffer
|
|
13
|
+
comments?: string[]
|
|
14
|
+
}
|
|
15
|
+
export declare type UintArrRet = ImageData & {
|
|
16
|
+
exifBuffer?: ArrayBuffer
|
|
17
|
+
comments?: string[]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ImageData {
|
|
21
|
+
width: number
|
|
22
|
+
height: number
|
|
23
|
+
data: Uint8ClampedArray | Buffer
|
|
24
|
+
colorSpace?: 'srgb'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type BufferLike = Buffer | Uint8Array | ArrayLike<number> | Iterable<number> | ArrayBuffer
|
|
28
|
+
|
|
29
|
+
export interface DecoderOptions {
|
|
30
|
+
useTArray: boolean
|
|
31
|
+
colorTransform?: boolean
|
|
32
|
+
formatAsRGBA?: boolean
|
|
33
|
+
tolerantDecoding?: boolean
|
|
34
|
+
maxResolutionInMP?: number
|
|
35
|
+
maxMemoryUsageInMB?: number
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type GitHooksConfig = {
|
|
39
|
+
[K in typeof VALID_GIT_HOOKS[number]]?: string
|
|
40
|
+
} & {
|
|
41
|
+
preserveUnused?: boolean | typeof VALID_GIT_HOOKS[number][]
|
|
42
|
+
verbose?: boolean
|
|
43
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bun-git-hooks",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "A modern, zero dependency tool for managing git hooks in Bun projects.",
|
|
6
|
+
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/stacksjs/bun-git-hooks#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/stacksjs/bun-git-hooks.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/stacksjs/bun-git-hooks/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"bun-git-hooks",
|
|
18
|
+
"pre-commit",
|
|
19
|
+
"pre-push",
|
|
20
|
+
"git",
|
|
21
|
+
"hook",
|
|
22
|
+
"hooks",
|
|
23
|
+
"bun",
|
|
24
|
+
"simple-git-hooks",
|
|
25
|
+
"typescript",
|
|
26
|
+
"cli",
|
|
27
|
+
"library"
|
|
28
|
+
],
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"import": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./*": {
|
|
35
|
+
"import": "./dist/*"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"module": "./dist/index.js",
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"bin": {
|
|
41
|
+
"git-hooks": "./dist/bin/cli.js",
|
|
42
|
+
"bun-git-hooks": "./dist/bin/cli.js"
|
|
43
|
+
},
|
|
44
|
+
"files": ["README.md", "dist"],
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "bun build.ts && bun run compile",
|
|
47
|
+
"compile": "bun build ./bin/cli.ts --compile --minify --outfile bin/git-hooks",
|
|
48
|
+
"compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
|
|
49
|
+
"compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/git-hooks-linux-x64",
|
|
50
|
+
"compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/git-hooks-linux-arm64",
|
|
51
|
+
"compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/git-hooks-windows-x64.exe",
|
|
52
|
+
"compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/git-hooks-darwin-x64",
|
|
53
|
+
"compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/git-hooks-darwin-arm64",
|
|
54
|
+
"postinstall": "bun ./scripts/postinstall.ts",
|
|
55
|
+
"uninstall": "bun ./scripts/uninstall.ts",
|
|
56
|
+
"lint": "bunx --bun eslint .",
|
|
57
|
+
"lint:fix": "bunx --bun eslint . --fix",
|
|
58
|
+
"fresh": "bunx rimraf node_modules/ bun.lock && bun i",
|
|
59
|
+
"changelog": "bunx changelogen --output CHANGELOG.md",
|
|
60
|
+
"prepublishOnly": "bun --bun run build && bun run compile:all",
|
|
61
|
+
"release": "bun run changelog && bunx bumpp package.json --all",
|
|
62
|
+
"test": "bun test",
|
|
63
|
+
"dev:docs": "bun --bun vitepress dev docs",
|
|
64
|
+
"build:docs": "bun --bun vitepress build docs",
|
|
65
|
+
"preview:docs": "bun --bun vitepress preview docs",
|
|
66
|
+
"typecheck": "bun --bun tsc --noEmit"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@iconify-json/carbon": "^1.2.7",
|
|
70
|
+
"@shikijs/vitepress-twoslash": "^2.3.2",
|
|
71
|
+
"@stacksjs/eslint-config": "^4.2.1-beta.1",
|
|
72
|
+
"@types/bun": "^1.2.2",
|
|
73
|
+
"@vite-pwa/vitepress": "^0.5.3",
|
|
74
|
+
"bumpp": "^10.0.3",
|
|
75
|
+
"bun-plugin-dtsx": "^0.21.9",
|
|
76
|
+
"bunfig": "^0.7.0",
|
|
77
|
+
"changelogen": "^0.5.7",
|
|
78
|
+
"lint-staged": "^15.4.3",
|
|
79
|
+
"typescript": "^5.7.3",
|
|
80
|
+
"unocss": "^65.4.3",
|
|
81
|
+
"unplugin-icons": "^22.0.0",
|
|
82
|
+
"unplugin-vue-components": "^28.0.0",
|
|
83
|
+
"vite-plugin-pwa": "^0.21.1",
|
|
84
|
+
"vitepress": "^1.6.3"
|
|
85
|
+
},
|
|
86
|
+
"overrides": {
|
|
87
|
+
"unconfig": "0.3.10"
|
|
88
|
+
},
|
|
89
|
+
"lint-staged": {
|
|
90
|
+
"*.{js,ts}": "bunx --bun eslint . --fix"
|
|
91
|
+
}
|
|
92
|
+
}
|