create-routify 1.5.2 → 1.5.4
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
|
@@ -30,8 +30,7 @@ beforeAll(async () => {
|
|
|
30
30
|
await import('../.routify/routify-init.js')
|
|
31
31
|
router = globalThis.__routify.routers[0]
|
|
32
32
|
await router.ready()
|
|
33
|
-
|
|
34
|
-
await new Promise((resolve) => setTimeout(resolve))
|
|
33
|
+
await router.activeRoute.get().rendered
|
|
35
34
|
})
|
|
36
35
|
|
|
37
36
|
${tests.map(resolveTestTemplate).join('\n\n')}
|
package/src/utils/repos.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readdir } from 'fs/promises';
|
|
2
2
|
import { dirname, join, resolve } from 'path';
|
|
3
3
|
import { fileURLToPath, pathToFileURL } from 'url';
|
|
4
|
-
import { existsSync } from 'fs';
|
|
4
|
+
import { existsSync, rmSync } from 'fs';
|
|
5
5
|
import { createRequire } from 'module';
|
|
6
6
|
import download from 'download-git-repo';
|
|
7
7
|
import { emitter } from './index.js';
|
|
@@ -22,6 +22,7 @@ const ensureRepo = async (url, force, onDownload) => {
|
|
|
22
22
|
|
|
23
23
|
// if repo doesn't exist, download it
|
|
24
24
|
if (!existsSync(repoPath) || force) {
|
|
25
|
+
rmSync(repoPath, { recursive: true, force: true });
|
|
25
26
|
emitter.emit('download', url);
|
|
26
27
|
if (onDownload) onDownload();
|
|
27
28
|
await new Promise((resolve, reject) =>
|