@staff0rd/assist 0.447.0 → 0.448.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/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.447.0",
9
+ version: "0.448.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -9039,11 +9039,34 @@ function getNestedValue(obj, path71) {
9039
9039
  return current;
9040
9040
  }
9041
9041
 
9042
+ // src/commands/config/readRawConfigLayers.ts
9043
+ function readRawConfigLayers(cwd) {
9044
+ const global = loadRawYaml(getGlobalConfigPath());
9045
+ return {
9046
+ project: loadRawYaml(getConfigPathFrom(cwd)),
9047
+ global,
9048
+ repoOverride: global.repos ? resolveRepoOverride(global, getCurrentOrigin(cwd)) : {}
9049
+ };
9050
+ }
9051
+
9052
+ // src/commands/config/resolveConfigSource.ts
9053
+ function resolveConfigSource(key, layers) {
9054
+ if (getNestedValue(layers.project, key) !== void 0) return "project";
9055
+ if (getNestedValue(layers.repoOverride, key) !== void 0) return "global";
9056
+ if (getNestedValue(layers.global, key) !== void 0) return "global";
9057
+ return "default";
9058
+ }
9059
+
9042
9060
  // src/commands/config/readConfigEntries.ts
9043
9061
  var KEYS_STRIPPED_FROM_MERGED_CONFIG = /* @__PURE__ */ new Set(["repos"]);
9044
9062
  function readConfigEntries(cwd) {
9045
9063
  const config = loadConfigFrom(cwd);
9046
- return describeConfigLeaves(assistConfigSchema).filter((leaf) => !KEYS_STRIPPED_FROM_MERGED_CONFIG.has(leaf.key)).map((leaf) => ({ ...leaf, value: getNestedValue(config, leaf.key) }));
9064
+ const layers = readRawConfigLayers(cwd);
9065
+ return describeConfigLeaves(assistConfigSchema).filter((leaf) => !KEYS_STRIPPED_FROM_MERGED_CONFIG.has(leaf.key)).map((leaf) => ({
9066
+ ...leaf,
9067
+ value: getNestedValue(config, leaf.key),
9068
+ source: resolveConfigSource(leaf.key, layers)
9069
+ }));
9047
9070
  }
9048
9071
 
9049
9072
  // src/commands/sessions/web/getConfig.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.447.0",
3
+ "version": "0.448.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {