safeword 0.25.13 → 0.25.14
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/{check-JAQRD5VU.js → check-2PXR22KK.js} +3 -3
- package/dist/{chunk-2RK4OKUL.js → chunk-5LNJMGEC.js} +2 -2
- package/dist/{chunk-GRUI64JZ.js → chunk-JW7FGAF7.js} +3 -3
- package/dist/{chunk-GXHO3A37.js → chunk-RC6237QP.js} +11 -49
- package/dist/{chunk-GXHO3A37.js.map → chunk-RC6237QP.js.map} +1 -1
- package/dist/cli.js +5 -5
- package/dist/{diff-P7ZV5RWW.js → diff-DAIG7Y75.js} +2 -2
- package/dist/{reset-WIFAUYZR.js → reset-EVAIIUTL.js} +2 -2
- package/dist/{setup-OCWWC5D5.js → setup-FFABEGEH.js} +4 -4
- package/dist/{upgrade-4UJRAAPU.js → upgrade-PS67PIWQ.js} +4 -4
- package/package.json +2 -2
- package/templates/hooks/lib/active-ticket.ts +1 -1
- package/templates/hooks/lib/test-runner.ts +112 -0
- package/templates/hooks/post-tool-quality.ts +5 -5
- package/templates/hooks/pre-tool-quality.ts +3 -3
- package/templates/hooks/stop-quality.ts +127 -94
- /package/dist/{check-JAQRD5VU.js.map → check-2PXR22KK.js.map} +0 -0
- /package/dist/{chunk-2RK4OKUL.js.map → chunk-5LNJMGEC.js.map} +0 -0
- /package/dist/{chunk-GRUI64JZ.js.map → chunk-JW7FGAF7.js.map} +0 -0
- /package/dist/{diff-P7ZV5RWW.js.map → diff-DAIG7Y75.js.map} +0 -0
- /package/dist/{reset-WIFAUYZR.js.map → reset-EVAIIUTL.js.map} +0 -0
- /package/dist/{setup-OCWWC5D5.js.map → setup-FFABEGEH.js.map} +0 -0
- /package/dist/{upgrade-4UJRAAPU.js.map → upgrade-PS67PIWQ.js.map} +0 -0
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./chunk-FJYRWU2V.js";
|
|
4
4
|
import {
|
|
5
5
|
getMissingPacks
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5LNJMGEC.js";
|
|
7
7
|
import {
|
|
8
8
|
SAFEWORD_SCHEMA,
|
|
9
9
|
createProjectContext,
|
|
10
10
|
reconcile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RC6237QP.js";
|
|
12
12
|
import "./chunk-Q4VPBNNZ.js";
|
|
13
13
|
import {
|
|
14
14
|
VERSION
|
|
@@ -189,4 +189,4 @@ async function check(options) {
|
|
|
189
189
|
export {
|
|
190
190
|
check
|
|
191
191
|
};
|
|
192
|
-
//# sourceMappingURL=check-
|
|
192
|
+
//# sourceMappingURL=check-2PXR22KK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setupPythonTooling
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RC6237QP.js";
|
|
4
4
|
import {
|
|
5
5
|
VERSION
|
|
6
6
|
} from "./chunk-ORQHKDT2.js";
|
|
@@ -273,4 +273,4 @@ export {
|
|
|
273
273
|
detectLanguages,
|
|
274
274
|
getMissingPacks
|
|
275
275
|
};
|
|
276
|
-
//# sourceMappingURL=chunk-
|
|
276
|
+
//# sourceMappingURL=chunk-5LNJMGEC.js.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
LANGUAGE_PACKS,
|
|
3
3
|
addInstalledPack,
|
|
4
4
|
isPackInstalled
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5LNJMGEC.js";
|
|
6
6
|
import {
|
|
7
7
|
isGitRepo
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RC6237QP.js";
|
|
9
9
|
|
|
10
10
|
// src/packs/install.ts
|
|
11
11
|
function installPack(packId, cwd) {
|
|
@@ -23,4 +23,4 @@ function installPack(packId, cwd) {
|
|
|
23
23
|
export {
|
|
24
24
|
installPack
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-JW7FGAF7.js.map
|
|
@@ -1765,6 +1765,7 @@ var SAFEWORD_SCHEMA = {
|
|
|
1765
1765
|
".safeword/hooks/lib/lint.ts": { template: "hooks/lib/lint.ts" },
|
|
1766
1766
|
".safeword/hooks/lib/quality.ts": { template: "hooks/lib/quality.ts" },
|
|
1767
1767
|
".safeword/hooks/lib/quality-state.ts": { template: "hooks/lib/quality-state.ts" },
|
|
1768
|
+
".safeword/hooks/lib/test-runner.ts": { template: "hooks/lib/test-runner.ts" },
|
|
1768
1769
|
// Hooks - TypeScript with Bun runtime
|
|
1769
1770
|
".safeword/hooks/session-verify-agents.ts": {
|
|
1770
1771
|
template: "hooks/session-verify-agents.ts"
|
|
@@ -2078,12 +2079,7 @@ var SAFEWORD_SCHEMA = {
|
|
|
2078
2079
|
// src/utils/project-detector.ts
|
|
2079
2080
|
import { existsSync as existsSync2, readdirSync, readFileSync as readFileSync2 } from "fs";
|
|
2080
2081
|
import nodePath4 from "path";
|
|
2081
|
-
var {
|
|
2082
|
-
TAILWIND_PACKAGES,
|
|
2083
|
-
TANSTACK_QUERY_PACKAGES,
|
|
2084
|
-
hasExistingLinter,
|
|
2085
|
-
hasExistingFormatter
|
|
2086
|
-
} = detect;
|
|
2082
|
+
var { TAILWIND_PACKAGES, TANSTACK_QUERY_PACKAGES, hasExistingLinter, hasExistingFormatter } = detect;
|
|
2087
2083
|
var PYPROJECT_TOML = "pyproject.toml";
|
|
2088
2084
|
var REQUIREMENTS_TXT = "requirements.txt";
|
|
2089
2085
|
var GO_MOD = "go.mod";
|
|
@@ -2142,13 +2138,11 @@ function hasShellScripts(cwd, maxDepth = 4) {
|
|
|
2142
2138
|
}
|
|
2143
2139
|
return scan(cwd, 0);
|
|
2144
2140
|
}
|
|
2141
|
+
function findFirstExisting(cwd, candidates) {
|
|
2142
|
+
return candidates.find((file) => existsSync2(nodePath4.join(cwd, file)));
|
|
2143
|
+
}
|
|
2145
2144
|
function findExistingEslintConfig(cwd) {
|
|
2146
|
-
|
|
2147
|
-
if (existsSync2(nodePath4.join(cwd, config))) {
|
|
2148
|
-
return config;
|
|
2149
|
-
}
|
|
2150
|
-
}
|
|
2151
|
-
return void 0;
|
|
2145
|
+
return findFirstExisting(cwd, ESLINT_CONFIG_FILES);
|
|
2152
2146
|
}
|
|
2153
2147
|
function findExistingRuffConfig(cwd) {
|
|
2154
2148
|
if (existsSync2(nodePath4.join(cwd, "ruff.toml"))) return "ruff.toml";
|
|
@@ -2184,39 +2178,7 @@ function hasExistingImportLinterConfig(cwd) {
|
|
|
2184
2178
|
return false;
|
|
2185
2179
|
}
|
|
2186
2180
|
}
|
|
2187
|
-
function findExistingGolangciConfig(cwd) {
|
|
2188
|
-
for (const config of GOLANGCI_CONFIG_FILES) {
|
|
2189
|
-
if (existsSync2(nodePath4.join(cwd, config))) {
|
|
2190
|
-
return config;
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
return void 0;
|
|
2194
|
-
}
|
|
2195
|
-
function findExistingClippyConfig(cwd) {
|
|
2196
|
-
for (const config of CLIPPY_CONFIG_FILES) {
|
|
2197
|
-
if (existsSync2(nodePath4.join(cwd, config))) {
|
|
2198
|
-
return config;
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
return void 0;
|
|
2202
|
-
}
|
|
2203
|
-
function findExistingRustfmtConfig(cwd) {
|
|
2204
|
-
for (const config of RUSTFMT_CONFIG_FILES) {
|
|
2205
|
-
if (existsSync2(nodePath4.join(cwd, config))) {
|
|
2206
|
-
return config;
|
|
2207
|
-
}
|
|
2208
|
-
}
|
|
2209
|
-
return void 0;
|
|
2210
|
-
}
|
|
2211
2181
|
var SQLFLUFF_CONFIG_FILES = [".sqlfluff", "setup.cfg"];
|
|
2212
|
-
function findExistingSqlfluffConfig(cwd) {
|
|
2213
|
-
for (const config of SQLFLUFF_CONFIG_FILES) {
|
|
2214
|
-
if (existsSync2(nodePath4.join(cwd, config))) {
|
|
2215
|
-
return config;
|
|
2216
|
-
}
|
|
2217
|
-
}
|
|
2218
|
-
return void 0;
|
|
2219
|
-
}
|
|
2220
2182
|
function detectFrameworks(deps, developmentDeps, allDeps) {
|
|
2221
2183
|
const hasNextJs = "next" in deps;
|
|
2222
2184
|
return {
|
|
@@ -2248,10 +2210,10 @@ function detectCoreTooling(cwd, scripts) {
|
|
|
2248
2210
|
}
|
|
2249
2211
|
function detectSystemsTooling(cwd) {
|
|
2250
2212
|
return {
|
|
2251
|
-
existingGolangciConfig: cwd ?
|
|
2252
|
-
existingClippyConfig: cwd ?
|
|
2253
|
-
existingRustfmtConfig: cwd ?
|
|
2254
|
-
existingSqlfluffConfig: cwd ?
|
|
2213
|
+
existingGolangciConfig: cwd ? findFirstExisting(cwd, GOLANGCI_CONFIG_FILES) : void 0,
|
|
2214
|
+
existingClippyConfig: cwd ? findFirstExisting(cwd, CLIPPY_CONFIG_FILES) : void 0,
|
|
2215
|
+
existingRustfmtConfig: cwd ? findFirstExisting(cwd, RUSTFMT_CONFIG_FILES) : void 0,
|
|
2216
|
+
existingSqlfluffConfig: cwd ? findFirstExisting(cwd, SQLFLUFF_CONFIG_FILES) : void 0
|
|
2255
2217
|
};
|
|
2256
2218
|
}
|
|
2257
2219
|
function detectExistingTooling(cwd, scripts) {
|
|
@@ -2311,4 +2273,4 @@ export {
|
|
|
2311
2273
|
detectLanguages,
|
|
2312
2274
|
createProjectContext
|
|
2313
2275
|
};
|
|
2314
|
-
//# sourceMappingURL=chunk-
|
|
2276
|
+
//# sourceMappingURL=chunk-RC6237QP.js.map
|