docusaurus-plugin-openapi-docs 0.0.0-756 → 0.0.0-757
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/index.js +9 -0
- package/package.json +2 -2
- package/src/index.ts +12 -0
package/lib/index.js
CHANGED
|
@@ -375,6 +375,15 @@ custom_edit_url: null
|
|
|
375
375
|
downloadUrl: metadata.downloadUrl,
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
+
if (!fs_1.default.existsSync(outputDir)) {
|
|
379
|
+
try {
|
|
380
|
+
fs_1.default.mkdirSync(outputDir, { recursive: true });
|
|
381
|
+
console.log(chalk_1.default.green(`Successfully created "${outputDir}"`));
|
|
382
|
+
}
|
|
383
|
+
catch (err) {
|
|
384
|
+
console.error(chalk_1.default.red(`Failed to create "${outputDir}"`), chalk_1.default.yellow(err));
|
|
385
|
+
}
|
|
386
|
+
}
|
|
378
387
|
const versionsJson = JSON.stringify(versionsArray, null, 2);
|
|
379
388
|
try {
|
|
380
389
|
fs_1.default.writeFileSync(`${outputDir}/versions.json`, versionsJson + "\n", "utf8");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-plugin-openapi-docs",
|
|
3
3
|
"description": "OpenAPI plugin for Docusaurus.",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-757",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=14"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "a727189a252bd5da29de36ebc5c6b18efa4572b5"
|
|
66
66
|
}
|
package/src/index.ts
CHANGED
|
@@ -535,6 +535,18 @@ custom_edit_url: null
|
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
if (!fs.existsSync(outputDir)) {
|
|
539
|
+
try {
|
|
540
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
541
|
+
console.log(chalk.green(`Successfully created "${outputDir}"`));
|
|
542
|
+
} catch (err) {
|
|
543
|
+
console.error(
|
|
544
|
+
chalk.red(`Failed to create "${outputDir}"`),
|
|
545
|
+
chalk.yellow(err)
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
538
550
|
const versionsJson = JSON.stringify(versionsArray, null, 2);
|
|
539
551
|
try {
|
|
540
552
|
fs.writeFileSync(
|