@iservu-inc/adf-cli 0.1.3 → 0.1.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/lib/commands/init.js
CHANGED
|
@@ -81,6 +81,29 @@ async function init(options) {
|
|
|
81
81
|
documentationUrls = urls;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
// Gather local documentation files (optional)
|
|
85
|
+
const { hasLocalDocs } = await inquirer.prompt([
|
|
86
|
+
{
|
|
87
|
+
type: 'confirm',
|
|
88
|
+
name: 'hasLocalDocs',
|
|
89
|
+
message: 'Do you have local documentation files to include? (use "." as the project root folder & add like so "./docs/")',
|
|
90
|
+
default: false
|
|
91
|
+
}
|
|
92
|
+
]);
|
|
93
|
+
|
|
94
|
+
let documentationFiles = [];
|
|
95
|
+
if (hasLocalDocs) {
|
|
96
|
+
const { files } = await inquirer.prompt([
|
|
97
|
+
{
|
|
98
|
+
type: 'input',
|
|
99
|
+
name: 'files',
|
|
100
|
+
message: 'Enter local documentation paths (comma-separated, e.g., ./docs/, ./README.md):',
|
|
101
|
+
filter: (input) => input.split(',').map(file => file.trim()).filter(Boolean)
|
|
102
|
+
}
|
|
103
|
+
]);
|
|
104
|
+
documentationFiles = files;
|
|
105
|
+
}
|
|
106
|
+
|
|
84
107
|
// Copy framework templates
|
|
85
108
|
const copySpinner = ora('Copying framework files...').start();
|
|
86
109
|
await copyTemplates(cwd);
|
|
@@ -91,6 +114,7 @@ async function init(options) {
|
|
|
91
114
|
workflow,
|
|
92
115
|
projectType: projectType.type,
|
|
93
116
|
documentationUrls,
|
|
117
|
+
documentationFiles,
|
|
94
118
|
timestamp: new Date().toISOString()
|
|
95
119
|
});
|
|
96
120
|
|
|
@@ -2,6 +2,7 @@ const fs = require('fs-extra');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const inquirer = require('inquirer');
|
|
4
4
|
const chalk = require('chalk');
|
|
5
|
+
const packageJson = require('../../package.json');
|
|
5
6
|
|
|
6
7
|
async function detectProjectType(cwd) {
|
|
7
8
|
const files = await fs.readdir(cwd);
|
|
@@ -171,10 +172,11 @@ async function getWorkflowRecommendation(projectType) {
|
|
|
171
172
|
|
|
172
173
|
function generateContextFile(data) {
|
|
173
174
|
return {
|
|
174
|
-
version:
|
|
175
|
+
version: packageJson.version,
|
|
175
176
|
workflow: data.workflow,
|
|
176
177
|
projectType: data.projectType,
|
|
177
178
|
documentationUrls: data.documentationUrls || [],
|
|
179
|
+
documentationFiles: data.documentationFiles || [],
|
|
178
180
|
createdAt: data.timestamp,
|
|
179
181
|
agents: getAgentsForWorkflow(data.workflow),
|
|
180
182
|
templates: {
|