@fro.bot/systematic 3.31.4 → 3.31.5
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/cli.js +35 -5
- package/dist/{index-bm6qkspg.js → index-c95n6n53.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
_enum,
|
|
26
26
|
literal,
|
|
27
27
|
displaySafe,
|
|
28
|
+
configEntryExists,
|
|
28
29
|
MAX_PROJECT_CONFIG_BYTES,
|
|
29
30
|
readTextBounded,
|
|
30
31
|
loadUserLevelSearchSettings,
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
SEARCH_NOTICES,
|
|
48
49
|
SEARCH_CONFIG_UNREADABLE_NOTE,
|
|
49
50
|
runSearch
|
|
50
|
-
} from "./index-
|
|
51
|
+
} from "./index-c95n6n53.js";
|
|
51
52
|
var __defProp = Object.defineProperty;
|
|
52
53
|
var __returnValue = (v) => v;
|
|
53
54
|
function __exportSetter(name, newValue) {
|
|
@@ -4009,14 +4010,43 @@ Search:`);
|
|
|
4009
4010
|
console.log(` ${kind.kind.padEnd(10)} ${kind.state.padEnd(10)} ${displaySafe(kind.directory)}`);
|
|
4010
4011
|
}
|
|
4011
4012
|
}
|
|
4012
|
-
function
|
|
4013
|
-
|
|
4013
|
+
function stripTerminalControls(text) {
|
|
4014
|
+
return text.replace(/\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)?/g, "").replace(/(?:\u001b\[|\u009b)[0-?]*[ -/]*[@-~]?/g, "").replace(/\u001b[@-Z\\-_]/g, "").replace(/[\u0000-\u0008\u000b-\u001f\u007f-\u009f]/g, "");
|
|
4015
|
+
}
|
|
4016
|
+
function isWithinRoot(root, target) {
|
|
4017
|
+
const relative = path6.relative(root, target);
|
|
4018
|
+
return relative !== ".." && !relative.startsWith(`..${path6.sep}`) && !path6.isAbsolute(relative);
|
|
4019
|
+
}
|
|
4020
|
+
function resolveProjectFileInRepository(filePath, projectRoot) {
|
|
4021
|
+
try {
|
|
4022
|
+
const realRoot = fs8.realpathSync(projectRoot);
|
|
4023
|
+
const realPath = fs8.realpathSync(filePath);
|
|
4024
|
+
return isWithinRoot(realRoot, realPath) ? { kind: "inside", realPath } : { kind: "withheld", reason: "it resolves outside the repository" };
|
|
4025
|
+
} catch {
|
|
4026
|
+
return { kind: "withheld", reason: "it could not be resolved" };
|
|
4027
|
+
}
|
|
4028
|
+
}
|
|
4029
|
+
function printConfigFile(heading, filePath, projectRoot) {
|
|
4030
|
+
let readPath = filePath;
|
|
4031
|
+
if (projectRoot !== undefined) {
|
|
4032
|
+
if (!configEntryExists(filePath))
|
|
4033
|
+
return;
|
|
4034
|
+
const contained = resolveProjectFileInRepository(filePath, projectRoot);
|
|
4035
|
+
if (contained.kind === "withheld") {
|
|
4036
|
+
console.log(`
|
|
4037
|
+
${heading}:`);
|
|
4038
|
+
console.log(` ${displaySafe(filePath)} is not shown: ${contained.reason}`);
|
|
4039
|
+
return;
|
|
4040
|
+
}
|
|
4041
|
+
readPath = contained.realPath;
|
|
4042
|
+
}
|
|
4043
|
+
const read = readTextBounded(readPath, MAX_PROJECT_CONFIG_BYTES);
|
|
4014
4044
|
if (read.kind === "absent")
|
|
4015
4045
|
return;
|
|
4016
4046
|
console.log(`
|
|
4017
4047
|
${heading}:`);
|
|
4018
4048
|
if (read.kind === "text") {
|
|
4019
|
-
console.log(read.content);
|
|
4049
|
+
console.log(projectRoot === undefined ? read.content : stripTerminalControls(read.content));
|
|
4020
4050
|
return;
|
|
4021
4051
|
}
|
|
4022
4052
|
console.log(` ${displaySafe(filePath)} could not be shown: ${read.reason}`);
|
|
@@ -4045,7 +4075,7 @@ function configShow(options) {
|
|
|
4045
4075
|
if (locations.customLocal !== null) {
|
|
4046
4076
|
console.log(` Custom local config: ${locations.customLocal}`);
|
|
4047
4077
|
}
|
|
4048
|
-
printConfigFile("Project configuration", paths.projectConfig);
|
|
4078
|
+
printConfigFile("Project configuration", paths.projectConfig, paths.projectRoot);
|
|
4049
4079
|
printConfigFile("User configuration", paths.userConfig);
|
|
4050
4080
|
const resolved = printResolvedSection();
|
|
4051
4081
|
printSearchSection(inspectSearchForConfigShow(paths));
|
|
@@ -13348,4 +13348,4 @@ async function runExternalSearch(checked, options) {
|
|
|
13348
13348
|
};
|
|
13349
13349
|
}
|
|
13350
13350
|
|
|
13351
|
-
export { parseFrontmatter, parse, parseTree, modify, applyEdits, CONFIG_PROTECTED_FIELD_PATHS, _isoDateTime, _isoDate, _isoTime, _isoDuration, string, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, number, boolean, array, object, union, discriminatedUnion, _enum, literal, displaySafe, MAX_PROJECT_CONFIG_BYTES, readTextBounded, loadUserLevelSearchSettings, AgentOverlaySchema, CategoryOverlaySchema, isRecord, isPermissionSetting, isAgentMode, extractString, toSourcedPiSubagentsOverlays, resolveRouting, loadConfig, loadConfigWithSources, isAgentDisabled, collectRoutingTargets, getConfigPaths, isDiscoverableMarkdown, findAgentsInDir, extractAgentFrontmatter, findCommandsInDir, extractCommandFrontmatter, findSkillsInDir, discoverSkills, inspectSearch, SEARCH_TOOL_NAME, SEARCH_ARGS, MIN_LIMIT, MAX_LIMIT, KIND_SELECTOR_EXTERNAL, SEARCH_TOOL_DESCRIPTION, SEARCH_ARG_DESCRIPTIONS, SEARCH_NOTICES, SEARCH_CONFIG_UNREADABLE_NOTE, runSearch };
|
|
13351
|
+
export { parseFrontmatter, parse, parseTree, modify, applyEdits, CONFIG_PROTECTED_FIELD_PATHS, _isoDateTime, _isoDate, _isoTime, _isoDuration, string, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, number, boolean, array, object, union, discriminatedUnion, _enum, literal, displaySafe, configEntryExists, MAX_PROJECT_CONFIG_BYTES, readTextBounded, loadUserLevelSearchSettings, AgentOverlaySchema, CategoryOverlaySchema, isRecord, isPermissionSetting, isAgentMode, extractString, toSourcedPiSubagentsOverlays, resolveRouting, loadConfig, loadConfigWithSources, isAgentDisabled, collectRoutingTargets, getConfigPaths, isDiscoverableMarkdown, findAgentsInDir, extractAgentFrontmatter, findCommandsInDir, extractCommandFrontmatter, findSkillsInDir, discoverSkills, inspectSearch, SEARCH_TOOL_NAME, SEARCH_ARGS, MIN_LIMIT, MAX_LIMIT, KIND_SELECTOR_EXTERNAL, SEARCH_TOOL_DESCRIPTION, SEARCH_ARG_DESCRIPTIONS, SEARCH_NOTICES, SEARCH_CONFIG_UNREADABLE_NOTE, runSearch };
|
package/dist/index.js
CHANGED