@lowdefy/errors 0.0.0-experimental-20260203220133 → 0.0.0-experimental-20260204101136

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.
@@ -84,23 +84,22 @@ import ConfigMessage from './ConfigMessage.js';
84
84
  this.resolved = true;
85
85
  return;
86
86
  }
87
- // Resolve location based on available info
87
+ // Resolve location based on available info, falling through if a method returns null
88
88
  let location = null;
89
89
  const configDir = configDirectory ?? context?.directories?.config;
90
90
  if (configKey && context?.keyMap) {
91
- // Mode 1: Use configKey -> keyMap -> refMap path (standard case after addKeys)
92
91
  location = ConfigMessage.resolveLocation({
93
92
  configKey,
94
93
  context
95
94
  });
96
- } else if (operatorLocation && context?.refMap) {
97
- // Mode 2: Use operatorLocation directly with refMap (early build stages)
95
+ }
96
+ if (!location && operatorLocation && context?.refMap) {
98
97
  location = ConfigMessage.resolveOperatorLocation({
99
98
  operatorLocation,
100
99
  context
101
100
  });
102
- } else if (filePath) {
103
- // Mode 3: Use raw filePath/lineNumber (YAML parse errors, etc.)
101
+ }
102
+ if (!location && filePath) {
104
103
  location = ConfigMessage.resolveRawLocation({
105
104
  filePath,
106
105
  lineNumber: finalLineNumber,
@@ -87,7 +87,8 @@ import resolveConfigLocation from './resolveConfigLocation.js';
87
87
  */ static resolveOperatorLocation({ operatorLocation, context }) {
88
88
  if (!operatorLocation) return null;
89
89
  const refEntry = context?.refMap?.[operatorLocation.ref];
90
- const filePath = refEntry?.path ?? 'lowdefy.yaml';
90
+ if (!refEntry?.path) return null;
91
+ const filePath = refEntry.path;
91
92
  const lineNumber = operatorLocation.line;
92
93
  let resolvedPath = filePath;
93
94
  if (context?.directories?.config) {
@@ -78,7 +78,7 @@ import formatErrorMessage from '../formatErrorMessage.js';
78
78
  this.link = null;
79
79
  return;
80
80
  }
81
- // Resolve location based on available info
81
+ // Resolve location based on available info, falling through if a method returns null
82
82
  let location = null;
83
83
  const configDir = configDirectory ?? context?.directories?.config;
84
84
  if (configKey && context?.keyMap) {
@@ -86,12 +86,14 @@ import formatErrorMessage from '../formatErrorMessage.js';
86
86
  configKey,
87
87
  context
88
88
  });
89
- } else if (operatorLocation && context?.refMap) {
89
+ }
90
+ if (!location && operatorLocation && context?.refMap) {
90
91
  location = ConfigMessage.resolveOperatorLocation({
91
92
  operatorLocation,
92
93
  context
93
94
  });
94
- } else if (filePath) {
95
+ }
96
+ if (!location && filePath) {
95
97
  location = ConfigMessage.resolveRawLocation({
96
98
  filePath,
97
99
  lineNumber,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/errors",
3
- "version": "0.0.0-experimental-20260203220133",
3
+ "version": "0.0.0-experimental-20260204101136",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy error classes for consistent error handling across build, server, and client",
6
6
  "homepage": "https://lowdefy.com",