@henryqw/pi-deps 0.3.3 → 0.3.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/extensions/deps.ts +2 -1
- package/package.json +1 -1
package/extensions/deps.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
1
2
|
import { randomUUID } from "node:crypto";
|
|
2
3
|
import { link, mkdir, readFile, rename, rm, writeFile, chmod } from "node:fs/promises";
|
|
3
4
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -136,7 +137,7 @@ export async function watchDependencyInstallation(
|
|
|
136
137
|
}
|
|
137
138
|
const deadline = Date.now() + waitTimeoutMs;
|
|
138
139
|
while (status.state === "running" && Date.now() < deadline) {
|
|
139
|
-
await
|
|
140
|
+
await delay(pollMs);
|
|
140
141
|
status = await readStatus();
|
|
141
142
|
if (!status) {
|
|
142
143
|
ctx.ui.setWidget(widgetKey, undefined);
|