@fatsolutions/ganchos 1.0.1 → 1.0.2
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/dist/commands/disable.js +1 -1
- package/dist/commands/enable.js +1 -1
- package/dist/commands/install.js +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/config.d.ts +2 -2
- package/dist/lib/hooks.js +1 -1
- package/package.json +1 -1
package/dist/commands/disable.js
CHANGED
|
@@ -4,7 +4,7 @@ async function disableCommand(languages) {
|
|
|
4
4
|
try {
|
|
5
5
|
await disableLanguages(projectRoot, languages);
|
|
6
6
|
console.log(`Disabled: ${languages.join(", ")}`);
|
|
7
|
-
console.log(
|
|
7
|
+
console.log('Run `npx "@fatsolutions/ganchos" install` to apply changes.');
|
|
8
8
|
} catch (err) {
|
|
9
9
|
if (err instanceof Error) {
|
|
10
10
|
console.error(`Error: ${err.message}`);
|
package/dist/commands/enable.js
CHANGED
|
@@ -11,7 +11,7 @@ async function enableCommand(languages) {
|
|
|
11
11
|
try {
|
|
12
12
|
await enableLanguages(projectRoot, languages);
|
|
13
13
|
console.log(`Enabled: ${languages.join(", ")}`);
|
|
14
|
-
console.log(
|
|
14
|
+
console.log('Run `npx "@fatsolutions/ganchos" install` to apply changes.');
|
|
15
15
|
} catch (err) {
|
|
16
16
|
if (err instanceof Error) {
|
|
17
17
|
console.error(`Error: ${err.message}`);
|
package/dist/commands/install.js
CHANGED
|
@@ -8,7 +8,7 @@ async function installCommand() {
|
|
|
8
8
|
const enabledLanguages = config.languages.filter((l) => l.enabled).map((l) => l.name);
|
|
9
9
|
if (enabledLanguages.length === 0) {
|
|
10
10
|
console.log("No languages enabled. Enable languages first with:");
|
|
11
|
-
console.log(
|
|
11
|
+
console.log(' npx "@fatsolutions/ganchos" enable javascript typescript python');
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
await installHookTools(projectRoot);
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { listCommand } from "./commands/list.js";
|
|
|
6
6
|
import { enableCommand } from "./commands/enable.js";
|
|
7
7
|
import { disableCommand } from "./commands/disable.js";
|
|
8
8
|
const program = new Command();
|
|
9
|
-
program.name("
|
|
9
|
+
program.name('"@fatsolutions/ganchos"').description("Git Hook Manager for Polyglot Monorepos").version("1.0.0");
|
|
10
10
|
program.command("install").description("Install git hooks based on configuration").action(installCommand);
|
|
11
11
|
program.command("generate").description("Generate hook content to stdout (for inspection)").action(generateCommand);
|
|
12
12
|
program.command("list").description("List configured languages").action(listCommand);
|
package/dist/lib/config.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FatHooksConfig } from '../types/index.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Read configuration from
|
|
4
|
+
* Read configuration from "@fatsolutions/ganchos".json, creating default if missing.
|
|
5
5
|
*/
|
|
6
6
|
declare function readConfig(projectRoot: string): Promise<FatHooksConfig>;
|
|
7
7
|
/**
|
|
8
|
-
* Write configuration to
|
|
8
|
+
* Write configuration to "@fatsolutions/ganchos".json.
|
|
9
9
|
*/
|
|
10
10
|
declare function writeConfig(projectRoot: string, config: FatHooksConfig): Promise<void>;
|
|
11
11
|
/**
|
package/dist/lib/hooks.js
CHANGED
|
@@ -5,7 +5,7 @@ import { getHookScript, getGitHooksDir, getLanguageConfigDir } from "./paths.js"
|
|
|
5
5
|
import { readConfig } from "./config.js";
|
|
6
6
|
const HOOK_HEADER = `#!/bin/sh
|
|
7
7
|
# Auto-generated pre-commit hook
|
|
8
|
-
# DO NOT EDIT - managed by
|
|
8
|
+
# DO NOT EDIT - managed by "@fatsolutions/ganchos"
|
|
9
9
|
|
|
10
10
|
set -e
|
|
11
11
|
|