Skip to content

Commit 3476b9c

Browse files
fix: update v2 docs to reference correct package and generate version-specific LLM manifests
- Update docs/installation.md: durable-workflow/workflow:^2.0 (was laravel-workflow/laravel-workflow) - Update docusaurus.config.js footer: Packagist link to durable-workflow/workflow - Update scripts/generate-llms-full.js: Generate version-specific manifests (llms-full-1.x.txt, llms-full-2.0.txt) and copy lastVersion to canonical llms-full.txt Fixes #272 (installation docs), #273 (Packagist link), #274 (LLM manifest) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c7dc1be commit 3476b9c

File tree

3 files changed

+36
-16
lines changed

3 files changed

+36
-16
lines changed

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The engine also checks backend capability at durable task publication time and a
3939
Durable Workflow is installable via Composer. To install it, run the following command in your Laravel project:
4040

4141
```bash
42-
composer require laravel-workflow/laravel-workflow
42+
composer require durable-workflow/workflow:^2.0
4343
```
4444

4545
The package auto-loads its migrations, so a normal migrate run is enough after install:

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const config = {
142142
},
143143
{
144144
label: 'Packagist',
145-
href: 'https://packagist.org/packages/laravel-workflow/laravel-workflow',
145+
href: 'https://packagist.org/packages/durable-workflow/workflow',
146146
},
147147
],
148148
},

scripts/generate-llms-full.js

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -165,27 +165,47 @@ function collectContent(rootDir, dirPath = rootDir) {
165165
return combined;
166166
}
167167

168-
function resolveDocsSourceDir() {
169-
const versionedDocsDir = path.join(__dirname, '..', 'versioned_docs', 'version-1.x');
170-
171-
if (fs.existsSync(versionedDocsDir)) {
172-
return versionedDocsDir;
173-
}
174-
175-
return path.join(__dirname, '..', 'docs');
168+
function getLastVersion() {
169+
const configPath = path.join(__dirname, '..', 'docusaurus.config.js');
170+
const configContent = fs.readFileSync(configPath, 'utf8');
171+
const match = configContent.match(/lastVersion:\s*['"]([^'"]+)['"]/);
172+
return match ? match[1] : 'current';
176173
}
177174

178175
function main() {
179-
const docsDir = resolveDocsSourceDir();
180176
const buildDir = path.join(__dirname, '..', 'build');
181-
const outputFile = path.join(buildDir, 'llms-full.txt');
182-
183177
ensureDir(buildDir);
184178

185-
const content = collectContent(docsDir).trimStart() + '\n';
186-
fs.writeFileSync(outputFile, content, 'utf8');
179+
const lastVersion = getLastVersion();
180+
181+
// Generate manifest for v1.x (versioned docs)
182+
const v1DocsDir = path.join(__dirname, '..', 'versioned_docs', 'version-1.x');
183+
if (fs.existsSync(v1DocsDir)) {
184+
const v1Content = collectContent(v1DocsDir).trimStart() + '\n';
185+
const v1OutputFile = path.join(buildDir, 'llms-full-1.x.txt');
186+
fs.writeFileSync(v1OutputFile, v1Content, 'utf8');
187+
console.log('llms-full-1.x.txt generated successfully:', v1OutputFile);
188+
}
189+
190+
// Generate manifest for v2.0 (current docs)
191+
const v2DocsDir = path.join(__dirname, '..', 'docs');
192+
if (fs.existsSync(v2DocsDir)) {
193+
const v2Content = collectContent(v2DocsDir).trimStart() + '\n';
194+
const v2OutputFile = path.join(buildDir, 'llms-full-2.0.txt');
195+
fs.writeFileSync(v2OutputFile, v2Content, 'utf8');
196+
console.log('llms-full-2.0.txt generated successfully:', v2OutputFile);
197+
}
187198

188-
console.log('llms-full.txt generated successfully:', outputFile);
199+
// Copy the last version's manifest to llms-full.txt (canonical)
200+
const canonicalSource = lastVersion === '1.x'
201+
? path.join(buildDir, 'llms-full-1.x.txt')
202+
: path.join(buildDir, 'llms-full-2.0.txt');
203+
204+
const canonicalOutput = path.join(buildDir, 'llms-full.txt');
205+
if (fs.existsSync(canonicalSource)) {
206+
fs.copyFileSync(canonicalSource, canonicalOutput);
207+
console.log(`llms-full.txt (canonical) copied from ${lastVersion} manifest`);
208+
}
189209
}
190210

191211
main();

0 commit comments

Comments
 (0)