@docusaurus/core 0.0.0-6101 → 0.0.0-6102
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/core",
|
|
3
3
|
"description": "Easy to Maintain Open Source Documentation Websites",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-6102",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"url": "https://github.com/facebook/docusaurus/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@docusaurus/babel": "0.0.0-
|
|
37
|
-
"@docusaurus/bundler": "0.0.0-
|
|
38
|
-
"@docusaurus/logger": "0.0.0-
|
|
39
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
40
|
-
"@docusaurus/utils": "0.0.0-
|
|
41
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
42
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
36
|
+
"@docusaurus/babel": "0.0.0-6102",
|
|
37
|
+
"@docusaurus/bundler": "0.0.0-6102",
|
|
38
|
+
"@docusaurus/logger": "0.0.0-6102",
|
|
39
|
+
"@docusaurus/mdx-loader": "0.0.0-6102",
|
|
40
|
+
"@docusaurus/utils": "0.0.0-6102",
|
|
41
|
+
"@docusaurus/utils-common": "0.0.0-6102",
|
|
42
|
+
"@docusaurus/utils-validation": "0.0.0-6102",
|
|
43
43
|
"boxen": "^6.2.1",
|
|
44
44
|
"chalk": "^4.1.2",
|
|
45
45
|
"chokidar": "^3.5.3",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"webpack-merge": "^6.0.1"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
82
|
-
"@docusaurus/types": "0.0.0-
|
|
81
|
+
"@docusaurus/module-type-aliases": "0.0.0-6102",
|
|
82
|
+
"@docusaurus/types": "0.0.0-6102",
|
|
83
83
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
84
84
|
"@types/detect-port": "^1.3.3",
|
|
85
85
|
"@types/react-dom": "^18.2.7",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"engines": {
|
|
101
101
|
"node": ">=18.0"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "6544279597d408981d878dbfe723411787c5525b"
|
|
104
104
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
import type { Compiler } from 'webpack';
|
|
8
|
-
type WaitPluginOptions = {
|
|
9
|
-
filepath: string;
|
|
10
|
-
};
|
|
11
|
-
export default class WaitPlugin {
|
|
12
|
-
filepath: string;
|
|
13
|
-
constructor(options: WaitPluginOptions);
|
|
14
|
-
apply(compiler: Compiler): void;
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const tslib_1 = require("tslib");
|
|
10
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
11
|
-
class WaitPlugin {
|
|
12
|
-
constructor(options) {
|
|
13
|
-
this.filepath = options.filepath;
|
|
14
|
-
}
|
|
15
|
-
apply(compiler) {
|
|
16
|
-
// Before finishing the compilation step
|
|
17
|
-
compiler.hooks.make.tapPromise('WaitPlugin', () => waitOn(this.filepath));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.default = WaitPlugin;
|
|
21
|
-
// This is a re-implementation of the algorithm used by the "wait-on" package
|
|
22
|
-
// https://github.com/jeffbski/wait-on/blob/master/lib/wait-on.js#L200
|
|
23
|
-
async function waitOn(filepath) {
|
|
24
|
-
const pollingIntervalMs = 300;
|
|
25
|
-
const stabilityWindowMs = 750;
|
|
26
|
-
let lastFileSize = -1;
|
|
27
|
-
let lastFileTime = -1;
|
|
28
|
-
for (;;) {
|
|
29
|
-
let size = -1;
|
|
30
|
-
try {
|
|
31
|
-
size = (await fs_extra_1.default.stat(filepath)).size;
|
|
32
|
-
}
|
|
33
|
-
catch (err) { }
|
|
34
|
-
if (size !== -1) {
|
|
35
|
-
if (lastFileTime === -1 || size !== lastFileSize) {
|
|
36
|
-
lastFileSize = size;
|
|
37
|
-
lastFileTime = performance.now();
|
|
38
|
-
}
|
|
39
|
-
else if (performance.now() - lastFileTime >= stabilityWindowMs) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
await new Promise((resolve) => {
|
|
44
|
-
setTimeout(resolve, pollingIntervalMs);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|