@devicecloud.dev/dcd 3.3.4-beta.4 → 3.3.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/plan.js +0 -7
- package/dist/planMethods.js +0 -18
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/dist/plan.js
CHANGED
|
@@ -42,19 +42,14 @@ function filterFlowFiles(unfilteredFlowFiles, excludeFlows) {
|
|
|
42
42
|
return unfilteredFlowFiles;
|
|
43
43
|
}
|
|
44
44
|
function getWorkspaceConfig(input, unfilteredFlowFiles) {
|
|
45
|
-
console.log('[getWorkspaceConfig] Input path:', input);
|
|
46
|
-
console.log('[getWorkspaceConfig] Unfiltered flow files:', unfilteredFlowFiles);
|
|
47
45
|
const possibleConfigPaths = [
|
|
48
46
|
path.join(input, 'config.yaml'),
|
|
49
47
|
path.join(input, 'config.yml'),
|
|
50
48
|
].map((p) => path.normalize(p));
|
|
51
|
-
console.log('[getWorkspaceConfig] Looking for config files:', possibleConfigPaths);
|
|
52
49
|
const configFilePath = unfilteredFlowFiles.find((file) => possibleConfigPaths.includes(path.normalize(file)));
|
|
53
|
-
console.log('[getWorkspaceConfig] Found config file path:', configFilePath);
|
|
54
50
|
const config = configFilePath
|
|
55
51
|
? (0, planMethods_1.readYamlFileAsJson)(configFilePath)
|
|
56
52
|
: {};
|
|
57
|
-
console.log('[getWorkspaceConfig] Parsed config:', config);
|
|
58
53
|
return config;
|
|
59
54
|
}
|
|
60
55
|
async function plan(input, includeTags, excludeTags, excludeFlows) {
|
|
@@ -110,12 +105,10 @@ async function plan(input, includeTags, excludeTags, excludeFlows) {
|
|
|
110
105
|
return acc;
|
|
111
106
|
}, {});
|
|
112
107
|
const allFiles = await Promise.all(unfilteredFlowFiles.map((filePath) => checkDependencies(filePath))).then((results) => [...new Set(results.flat())]);
|
|
113
|
-
console.log('Found include tags in workspace config', workspaceConfig.includeTags);
|
|
114
108
|
const allIncludeTags = [
|
|
115
109
|
...includeTags,
|
|
116
110
|
...(workspaceConfig.includeTags || []),
|
|
117
111
|
];
|
|
118
|
-
console.log('Found exclude tags in workspace config', workspaceConfig.excludeTags);
|
|
119
112
|
const allExcludeTags = [
|
|
120
113
|
...excludeTags,
|
|
121
114
|
...(workspaceConfig.excludeTags || []),
|
package/dist/planMethods.js
CHANGED
|
@@ -37,38 +37,20 @@ 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);
|
|
41
40
|
const yamlText = fs.readFileSync(normalizedPath, 'utf8');
|
|
42
|
-
console.log('[YAML Parser] File contents:', '\n' + yamlText);
|
|
43
41
|
const result = yaml.load(yamlText);
|
|
44
|
-
console.log('[YAML Parser] Parsed result:', JSON.stringify(result, null, 2));
|
|
45
42
|
// Ensure includeTags and excludeTags are always arrays if present
|
|
46
43
|
if (result && typeof result === 'object') {
|
|
47
44
|
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
45
|
result.includeTags = result.includeTags ? [result.includeTags] : [];
|
|
53
46
|
}
|
|
54
47
|
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
48
|
result.excludeTags = result.excludeTags ? [result.excludeTags] : [];
|
|
60
49
|
}
|
|
61
50
|
}
|
|
62
51
|
return result;
|
|
63
52
|
}
|
|
64
53
|
catch (error) {
|
|
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
54
|
throw new Error(`Error parsing YAML file ${filePath}: ${error}`);
|
|
73
55
|
}
|
|
74
56
|
};
|
package/oclif.manifest.json
CHANGED