@mingxy/ocosay 1.1.9 → 1.1.10
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/package.json +1 -1
- package/dist/plugin.js +19 -18
- package/package.json +1 -1
package/dist/package.json
CHANGED
package/dist/plugin.js
CHANGED
|
@@ -9598,7 +9598,7 @@ async function ensureNaudiodonCompiled() {
|
|
|
9598
9598
|
return;
|
|
9599
9599
|
} catch {
|
|
9600
9600
|
logger8.info("naudiodon not compiled, will attempt to compile");
|
|
9601
|
-
notificationService.info("\u6B63\u5728\u7F16\u8BD1 naudiodon...", "Ocosay \u97F3\u9891\u540E\u7AEF");
|
|
9601
|
+
notificationService.info("\u6B63\u5728\u7F16\u8BD1 naudiodon...", "Ocosay \u97F3\u9891\u540E\u7AEF", 5e3);
|
|
9602
9602
|
}
|
|
9603
9603
|
try {
|
|
9604
9604
|
const naudiodonPath = dirname2(require2.resolve("naudiodon"));
|
|
@@ -9608,29 +9608,29 @@ async function ensureNaudiodonCompiled() {
|
|
|
9608
9608
|
stdio: "inherit"
|
|
9609
9609
|
});
|
|
9610
9610
|
logger8.info("naudiodon compiled successfully");
|
|
9611
|
-
notificationService.success("naudiodon \u7F16\u8BD1\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA");
|
|
9611
|
+
notificationService.success("naudiodon \u7F16\u8BD1\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA", 5e3);
|
|
9612
9612
|
} catch (err) {
|
|
9613
9613
|
logger8.warn({ err }, "naudiodon rebuild failed, checking for PortAudio");
|
|
9614
|
-
notificationService.warning("naudiodon \u7F16\u8BD1\u5931\u8D25", "\u6B63\u5728\u5C1D\u8BD5\u5B89\u88C5 PortAudio...");
|
|
9614
|
+
notificationService.warning("naudiodon \u7F16\u8BD1\u5931\u8D25", "\u6B63\u5728\u5C1D\u8BD5\u5B89\u88C5 PortAudio...", 5e3);
|
|
9615
9615
|
const installed = await installPortAudio();
|
|
9616
9616
|
if (installed.success) {
|
|
9617
9617
|
try {
|
|
9618
9618
|
const naudiodonPath = dirname2(require2.resolve("naudiodon"));
|
|
9619
|
-
notificationService.info("\u6B63\u5728\u91CD\u65B0\u7F16\u8BD1 naudiodon...", "Ocosay");
|
|
9619
|
+
notificationService.info("\u6B63\u5728\u91CD\u65B0\u7F16\u8BD1 naudiodon...", "Ocosay", 5e3);
|
|
9620
9620
|
execSync("npm rebuild naudiodon", {
|
|
9621
9621
|
cwd: naudiodonPath,
|
|
9622
9622
|
stdio: "inherit"
|
|
9623
9623
|
});
|
|
9624
9624
|
logger8.info("naudiodon compiled successfully after PortAudio install");
|
|
9625
|
-
notificationService.success("naudiodon \u7F16\u8BD1\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA");
|
|
9625
|
+
notificationService.success("naudiodon \u7F16\u8BD1\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA", 5e3);
|
|
9626
9626
|
} catch (retryErr) {
|
|
9627
9627
|
logger8.error({ err: retryErr }, "naudiodon compile failed even after PortAudio install");
|
|
9628
|
-
notificationService.error("naudiodon \u7F16\u8BD1\u5931\u8D25", "\u81EA\u52A8\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u624B\u52A8\u5B89\u88C5");
|
|
9628
|
+
notificationService.error("naudiodon \u7F16\u8BD1\u5931\u8D25", "\u81EA\u52A8\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u624B\u52A8\u5B89\u88C5", 8e3);
|
|
9629
9629
|
markNaudiodonSkipped();
|
|
9630
9630
|
}
|
|
9631
9631
|
} else {
|
|
9632
9632
|
logger8.error("PortAudio install failed");
|
|
9633
|
-
notificationService.error("PortAudio \u5B89\u88C5\u5931\u8D25", "\u81EA\u52A8\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u624B\u52A8\u5B89\u88C5");
|
|
9633
|
+
notificationService.error("PortAudio \u5B89\u88C5\u5931\u8D25", "\u81EA\u52A8\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u624B\u52A8\u5B89\u88C5", 8e3);
|
|
9634
9634
|
markNaudiodonSkipped();
|
|
9635
9635
|
}
|
|
9636
9636
|
}
|
|
@@ -9663,7 +9663,7 @@ async function installPortAudio() {
|
|
|
9663
9663
|
logger8.info({ platform, wsl }, "installing PortAudio");
|
|
9664
9664
|
const runInstall = async (cmd, desc) => {
|
|
9665
9665
|
logger8.info(`Running: ${cmd}`);
|
|
9666
|
-
notificationService.info(desc, "\u6B63\u5728\u5B89\u88C5...");
|
|
9666
|
+
notificationService.info(desc, "\u6B63\u5728\u5B89\u88C5...", 5e3);
|
|
9667
9667
|
try {
|
|
9668
9668
|
execSync(cmd, { stdio: "inherit" });
|
|
9669
9669
|
return true;
|
|
@@ -9672,7 +9672,8 @@ async function installPortAudio() {
|
|
|
9672
9672
|
if (msg.includes("sudo") || msg.includes("password") || msg.includes("Password")) {
|
|
9673
9673
|
notificationService.error(
|
|
9674
9674
|
"\u9700\u8981 sudo \u6743\u9650",
|
|
9675
|
-
"\u8BF7\u624B\u52A8\u8FD0\u884C: sudo apt-get update && sudo apt-get install -y alsa-utils"
|
|
9675
|
+
"\u8BF7\u624B\u52A8\u8FD0\u884C: sudo apt-get update && sudo apt-get install -y alsa-utils",
|
|
9676
|
+
8e3
|
|
9676
9677
|
);
|
|
9677
9678
|
logger8.error({ err }, "sudo password required");
|
|
9678
9679
|
return false;
|
|
@@ -9681,41 +9682,41 @@ async function installPortAudio() {
|
|
|
9681
9682
|
logger8.info("already installed");
|
|
9682
9683
|
return true;
|
|
9683
9684
|
}
|
|
9684
|
-
notificationService.error(desc + " \u5931\u8D25", msg.substring(0, 100));
|
|
9685
|
+
notificationService.error(desc + " \u5931\u8D25", msg.substring(0, 100), 8e3);
|
|
9685
9686
|
logger8.error({ err }, `install failed: ${desc}`);
|
|
9686
9687
|
return false;
|
|
9687
9688
|
}
|
|
9688
9689
|
};
|
|
9689
9690
|
if (platform === "linux" || wsl) {
|
|
9690
|
-
notificationService.info("\u68C0\u6D4B\u97F3\u9891\u8BBE\u5907...", "\u97F3\u9891\u540E\u7AEF");
|
|
9691
|
+
notificationService.info("\u68C0\u6D4B\u97F3\u9891\u8BBE\u5907...", "\u97F3\u9891\u540E\u7AEF", 5e3);
|
|
9691
9692
|
if (checkAlsa()) {
|
|
9692
9693
|
logger8.info("alsa-utils already available and working");
|
|
9693
|
-
notificationService.success("alsa-utils \u5C31\u7EEA", "\u97F3\u9891\u540E\u7AEF\u5DF2\u53EF\u7528");
|
|
9694
|
+
notificationService.success("alsa-utils \u5C31\u7EEA", "\u97F3\u9891\u540E\u7AEF\u5DF2\u53EF\u7528", 5e3);
|
|
9694
9695
|
return { success: true, message: "alsa" };
|
|
9695
9696
|
}
|
|
9696
|
-
notificationService.info("\u5B89\u88C5 alsa-utils...", "\u97F3\u9891\u540E\u7AEF");
|
|
9697
|
+
notificationService.info("\u5B89\u88C5 alsa-utils...", "\u97F3\u9891\u540E\u7AEF", 5e3);
|
|
9697
9698
|
const alsaInstalled = await runInstall(
|
|
9698
9699
|
"sudo apt-get update && sudo apt-get install -y alsa-utils",
|
|
9699
9700
|
"\u5B89\u88C5 alsa-utils"
|
|
9700
9701
|
);
|
|
9701
9702
|
if (alsaInstalled) {
|
|
9702
9703
|
if (checkAlsa()) {
|
|
9703
|
-
notificationService.success("alsa-utils \u5B89\u88C5\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA");
|
|
9704
|
+
notificationService.success("alsa-utils \u5B89\u88C5\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA", 5e3);
|
|
9704
9705
|
return { success: true, message: "alsa" };
|
|
9705
9706
|
} else {
|
|
9706
|
-
notificationService.warning("alsa-utils \u5B89\u88C5\u540E\u68C0\u6D4B\u5931\u8D25", "\u7EE7\u7EED\u5C1D\u8BD5\u5176\u4ED6\u65B9\u6848");
|
|
9707
|
+
notificationService.warning("alsa-utils \u5B89\u88C5\u540E\u68C0\u6D4B\u5931\u8D25", "\u7EE7\u7EED\u5C1D\u8BD5\u5176\u4ED6\u65B9\u6848", 5e3);
|
|
9707
9708
|
}
|
|
9708
9709
|
}
|
|
9709
|
-
notificationService.info("\u5B89\u88C5 libportaudio-dev...", "\u97F3\u9891\u540E\u7AEF");
|
|
9710
|
+
notificationService.info("\u5B89\u88C5 libportaudio-dev...", "\u97F3\u9891\u540E\u7AEF", 5e3);
|
|
9710
9711
|
const portaudioInstalled = await runInstall(
|
|
9711
9712
|
"sudo apt-get update && sudo apt-get install -y libportaudio-dev",
|
|
9712
9713
|
"\u5B89\u88C5 libportaudio-dev"
|
|
9713
9714
|
);
|
|
9714
9715
|
if (portaudioInstalled) {
|
|
9715
|
-
notificationService.success("libportaudio-dev \u5B89\u88C5\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA");
|
|
9716
|
+
notificationService.success("libportaudio-dev \u5B89\u88C5\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA", 5e3);
|
|
9716
9717
|
return { success: true, message: "portaudio" };
|
|
9717
9718
|
}
|
|
9718
|
-
notificationService.warning("PortAudio \u5B89\u88C5\u5931\u8D25", "\u97F3\u9891\u53EF\u80FD\u65E0\u6CD5\u6B63\u5E38\u5DE5\u4F5C");
|
|
9719
|
+
notificationService.warning("PortAudio \u5B89\u88C5\u5931\u8D25", "\u97F3\u9891\u53EF\u80FD\u65E0\u6CD5\u6B63\u5E38\u5DE5\u4F5C", 5e3);
|
|
9719
9720
|
markNaudiodonSkipped();
|
|
9720
9721
|
return { success: false, message: "linux install failed" };
|
|
9721
9722
|
}
|