nuxt-dev-ready 2.0.0 → 2.0.1
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/dist/index.js +2 -3
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -5,11 +5,10 @@ export default (async (port = 3000) => {
|
|
|
5
5
|
await portReady(port);
|
|
6
6
|
await pWaitFor(async () => {
|
|
7
7
|
try {
|
|
8
|
-
await axios.get(`http://localhost:${port}`);
|
|
8
|
+
return !(await axios.get(`http://localhost:${port}`)).data.includes('id="nuxt_loading_screen"');
|
|
9
9
|
} catch (error) {
|
|
10
|
-
return error.
|
|
10
|
+
return error.response !== undefined && error.response.status !== 503;
|
|
11
11
|
}
|
|
12
|
-
return true;
|
|
13
12
|
}, {
|
|
14
13
|
interval: 100
|
|
15
14
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-dev-ready",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Waits until the Nuxt dev server is loaded. Mainly useful for testing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wait"
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"fs-extra": "^11.1.1",
|
|
38
38
|
"jsdom": "^22.0.0",
|
|
39
39
|
"nuxt": "^3.4.2",
|
|
40
|
+
"ora": "^6.3.1",
|
|
40
41
|
"tree-kill-promise": "^3.0.14",
|
|
41
42
|
"with-local-tmp-dir": "^5.0.1"
|
|
42
43
|
},
|