@devicecloud.dev/dcd 3.3.4-beta.1 → 3.3.4-beta.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/planMethods.js +30 -4
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/dist/planMethods.js
CHANGED
|
@@ -37,13 +37,39 @@ function isFlowFile(filePath) {
|
|
|
37
37
|
const readYamlFileAsJson = (filePath) => {
|
|
38
38
|
try {
|
|
39
39
|
const normalizedPath = path.normalize(filePath);
|
|
40
|
+
console.log('[YAML Parser] Reading file:', normalizedPath);
|
|
40
41
|
const yamlText = fs.readFileSync(normalizedPath, 'utf8');
|
|
41
|
-
|
|
42
|
+
console.log('[YAML Parser] File contents:', '\n' + yamlText);
|
|
43
|
+
const result = yaml.load(yamlText);
|
|
44
|
+
console.log('[YAML Parser] Parsed result:', JSON.stringify(result, null, 2));
|
|
45
|
+
// Ensure includeTags and excludeTags are always arrays if present
|
|
46
|
+
if (result && typeof result === 'object') {
|
|
47
|
+
if ('includeTags' in result && !Array.isArray(result.includeTags)) {
|
|
48
|
+
console.log('[YAML Parser] Converting includeTags to array:', {
|
|
49
|
+
from: result.includeTags,
|
|
50
|
+
to: result.includeTags ? [result.includeTags] : [],
|
|
51
|
+
});
|
|
52
|
+
result.includeTags = result.includeTags ? [result.includeTags] : [];
|
|
53
|
+
}
|
|
54
|
+
if ('excludeTags' in result && !Array.isArray(result.excludeTags)) {
|
|
55
|
+
console.log('[YAML Parser] Converting excludeTags to array:', {
|
|
56
|
+
from: result.excludeTags,
|
|
57
|
+
to: result.excludeTags ? [result.excludeTags] : [],
|
|
58
|
+
});
|
|
59
|
+
result.excludeTags = result.excludeTags ? [result.excludeTags] : [];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return result;
|
|
42
63
|
}
|
|
43
64
|
catch (error) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
65
|
+
console.error('[YAML Parser] Error parsing file:', {
|
|
66
|
+
filePath,
|
|
67
|
+
normalizedPath: path.normalize(filePath),
|
|
68
|
+
errorName: error instanceof Error ? error.name : 'Unknown',
|
|
69
|
+
errorMessage: error instanceof Error ? error.message : String(error),
|
|
70
|
+
errorStack: error instanceof Error ? error.stack : undefined,
|
|
71
|
+
});
|
|
72
|
+
throw new Error(`Error parsing YAML file ${filePath}: ${error}`);
|
|
47
73
|
}
|
|
48
74
|
};
|
|
49
75
|
exports.readYamlFileAsJson = readYamlFileAsJson;
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED