@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.
@@ -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
- return yaml.load(yamlText);
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
- const message = `Error parsing YAML file ${filePath}: ${error}`;
45
- console.error(message);
46
- throw new Error(message);
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;
@@ -398,5 +398,5 @@
398
398
  ]
399
399
  }
400
400
  },
401
- "version": "3.3.4-beta.1"
401
+ "version": "3.3.4-beta.2"
402
402
  }
package/package.json CHANGED
@@ -80,7 +80,7 @@
80
80
  "test": "mocha --forbid-only \"test/**/*.test.ts\"",
81
81
  "version": "oclif readme && git add README.md"
82
82
  },
83
- "version": "3.3.4-beta.1",
83
+ "version": "3.3.4-beta.2",
84
84
  "bugs": {
85
85
  "url": "https://discord.gg/gm3mJwcNw8"
86
86
  },