-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmodule.ts
More file actions
204 lines (197 loc) · 6.07 KB
/
module.ts
File metadata and controls
204 lines (197 loc) · 6.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
// Copyright 2023-present Eser Ozvataf and other contributors. All rights reserved. Apache-2.0 license.
/**
* Codebase module definition for @eserstack/shell integration.
*
* @module
*/
import { Module } from "@eserstack/shell/module";
export const moduleDef: Module = new Module({
description: "Codebase management tools",
modules: {
// Setup
scaffolding: {
description: "Initialize project from template",
category: "Setup",
load: () => import("./scaffolding/mod.ts"),
},
install: {
description: "Install git hooks from .eser/manifest.yml",
category: "Setup",
load: () => import("./install.ts"),
},
uninstall: {
description: "Remove managed git hooks",
category: "Setup",
load: async () => {
const mod = await import("./install.ts");
return { main: mod.uninstallMain };
},
},
status: {
description: "Show git hook installation status",
category: "Setup",
load: async () => {
const mod = await import("./install.ts");
return { main: mod.statusMain };
},
},
// AI-powered
commitmsg: {
description: "Generate commit message from git diff",
category: "AI",
load: () => import("./commitmsg.ts"),
},
// GitHub
gh: {
description: "GitHub operations (contributors, releases, tags)",
category: "GitHub",
load: () => import("./gh.ts"),
},
// Release
versions: {
description: "Manage workspace package versions",
category: "Release",
load: () => import("./versions.ts"),
},
"changelog-gen": {
description: "Generate CHANGELOG from commits",
category: "Release",
load: () => import("./changelog-gen.ts"),
},
release: {
description: "Create a release (bump, changelog, commit, push)",
category: "Release",
load: () => import("./release.ts"),
},
rerelease: {
description: "Delete and recreate the current version tag",
category: "Release",
load: async () => {
const mod = await import("./release.ts");
return { main: mod.rereleaseMain };
},
},
unrelease: {
description: "Delete the current version tag",
category: "Release",
load: async () => {
const mod = await import("./release.ts");
return { main: mod.unreleaseMain };
},
},
// Validation
"validate-eof": {
description: "Ensure files end with newline",
category: "Validation",
load: () => import("./validate-eof.ts"),
},
"validate-trailing-whitespace": {
description: "Remove trailing whitespace",
category: "Validation",
load: () => import("./validate-trailing-whitespace.ts"),
},
"validate-bom": {
description: "Remove UTF-8 byte order markers",
category: "Validation",
load: () => import("./validate-bom.ts"),
},
"validate-line-endings": {
description: "Normalize line endings to LF",
category: "Validation",
load: () => import("./validate-line-endings.ts"),
},
"validate-large-files": {
description: "Detect files exceeding size limit",
category: "Validation",
load: () => import("./validate-large-files.ts"),
},
"validate-case-conflict": {
description: "Detect case-conflicting filenames",
category: "Validation",
load: () => import("./validate-case-conflict.ts"),
},
"validate-merge-conflict": {
description: "Detect merge conflict markers",
category: "Validation",
load: () => import("./validate-merge-conflict.ts"),
},
"validate-json": {
description: "Validate JSON syntax",
category: "Validation",
load: () => import("./validate-json.ts"),
},
"validate-toml": {
description: "Validate TOML syntax",
category: "Validation",
load: () => import("./validate-toml.ts"),
},
"validate-yaml": {
description: "Validate YAML syntax",
category: "Validation",
load: () => import("./validate-yaml.ts"),
},
"validate-symlinks": {
description: "Detect broken symlinks",
category: "Validation",
load: () => import("./validate-symlinks.ts"),
},
"validate-shebangs": {
description: "Validate shebang consistency",
category: "Validation",
load: () => import("./validate-shebangs.ts"),
},
"validate-secrets": {
description: "Detect credentials and private keys",
category: "Validation",
load: () => import("./validate-secrets.ts"),
},
"validate-filenames": {
description: "Enforce filename conventions",
category: "Validation",
load: () => import("./validate-filenames.ts"),
},
"validate-submodules": {
description: "Detect git submodules",
category: "Validation",
load: () => import("./validate-submodules.ts"),
},
"validate-commit-msg": {
description: "Validate conventional commit format",
category: "Validation",
load: () => import("./validate-commit-msg.ts"),
},
"validate-docs": {
description: "Validate JSDoc documentation",
category: "Validation",
load: () => import("./validate-docs.ts"),
},
"validate-circular-deps": {
description: "Detect circular dependencies",
category: "Validation",
load: () => import("./validate-circular-deps.ts"),
},
"validate-export-names": {
description: "Validate export naming conventions",
category: "Validation",
load: () => import("./validate-export-names.ts"),
},
"validate-licenses": {
description: "Validate license headers",
category: "Validation",
load: () => import("./validate-licenses.ts"),
},
"validate-mod-exports": {
description: "Validate mod.ts export coverage",
category: "Validation",
load: () => import("./validate-mod-exports.ts"),
},
"validate-package-configs": {
description: "Validate package configurations",
category: "Validation",
load: () => import("./validate-package-configs.ts"),
},
},
aliases: {
init: "scaffolding",
},
});