Skip to content

Commit 2227e3f

Browse files
feat(generator/orama-db): fix output
1 parent 602df58 commit 2227e3f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ Options:
4040
-o, --output <path> Specify the relative or absolute output directory
4141
-v, --version <semver> Specify the target version of Node.js, semver compliant (default: "v22.6.0")
4242
-c, --changelog <url> Specify the path (file: or https://) to the CHANGELOG.md file (default: "https://raw.githubusercontent.com/nodejs/node/HEAD/CHANGELOG.md")
43-
-t, --target [mode...] Set the processing target modes (choices: "json-simple", "legacy-html", "legacy-html-all", "man-page", "legacy-json", "legacy-json-all", "addon-verify", "api-links")
43+
-t, --target [mode...] Set the processing target modes (choices: "json-simple", "legacy-html", "legacy-html-all", "man-page", "legacy-json", "legacy-json-all", "addon-verify", "api-links", "orama-db")
4444
-h, --help display help for command
4545
```

Diff for: src/generators/orama-db/index.mjs

+6-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
* @param {Input} input
2929
* @param {Partial<GeneratorOptions>} options
3030
*/
31-
async generate(input) {
31+
async generate(input, { output, version }) {
3232
const buildSection = createSectionBuilder();
3333

3434
// Create the Orama instance with the schema
@@ -84,7 +84,11 @@ export default {
8484

8585
headNodes.map(processModuleNodes);
8686

87-
await persistToFile(db, 'json', './db.json');
87+
await persistToFile(
88+
db,
89+
'json',
90+
`${output}/${version.raw.replaceAll('.', '-')}-orama-db.json`
91+
);
8892

8993
return db;
9094
},

0 commit comments

Comments
 (0)