deployai 0.1.0-beta.31 → 0.1.0-beta.32
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 +20 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24737,7 +24737,7 @@ function messages(root) {
|
|
|
24737
24737
|
}
|
|
24738
24738
|
|
|
24739
24739
|
// src/version.ts
|
|
24740
|
-
var CLI_VERSION = "0.1.0-beta.
|
|
24740
|
+
var CLI_VERSION = "0.1.0-beta.32";
|
|
24741
24741
|
|
|
24742
24742
|
// src/api.ts
|
|
24743
24743
|
function apiContext(apiFlag) {
|
|
@@ -26557,6 +26557,16 @@ function soundCommand(root, action, state, tool, opts = {}) {
|
|
|
26557
26557
|
if (act !== "status") throw new CliError("Usage: npx deployai@latest sound on|off|status|test, or sound agent on|off", 1, "usage");
|
|
26558
26558
|
out(t(soundWanted(cfg) ? "soundOn" : "soundOff"));
|
|
26559
26559
|
}
|
|
26560
|
+
function refreshAgentScript(root) {
|
|
26561
|
+
const script = join10(root, AGENT_SCRIPT);
|
|
26562
|
+
if (!existsSync10(script)) return false;
|
|
26563
|
+
const text2 = agentScript(soundsDir());
|
|
26564
|
+
const now = readFileSync8(script, "utf8");
|
|
26565
|
+
if (now === text2 || !now.startsWith("// DeployAI's sound and tab dot")) return false;
|
|
26566
|
+
writeSoundFiles();
|
|
26567
|
+
writeFileSync7(script, text2);
|
|
26568
|
+
return true;
|
|
26569
|
+
}
|
|
26560
26570
|
|
|
26561
26571
|
// src/commands/link.ts
|
|
26562
26572
|
import { createInterface } from "readline/promises";
|
|
@@ -28657,15 +28667,16 @@ ${choices.brief}
|
|
|
28657
28667
|
say("Then, in this order:");
|
|
28658
28668
|
steps.forEach((s, i) => say(`${i + 1}. ${s.cmd ? `Run ${s.cmd}. ` : ""}${s.say}`));
|
|
28659
28669
|
say();
|
|
28660
|
-
|
|
28661
|
-
|
|
28670
|
+
const server = await serverRules(ctx.apiUrl);
|
|
28671
|
+
const lang = langOf(choices.ownerLanguage);
|
|
28672
|
+
say(rule(server, `runCommands.${lang}`, runCommandsRule(lang)));
|
|
28673
|
+
say(rule(server, "modelFlag", MODEL_FLAG_RULE));
|
|
28662
28674
|
const askLine2 = toolAskLine(deployToolFromEnv(process.env));
|
|
28663
28675
|
if (askLine2) say(askLine2);
|
|
28664
|
-
const server = await serverRules(ctx.apiUrl);
|
|
28665
28676
|
say(rule(server, "askOwner", ASK_OWNER_RULE));
|
|
28666
28677
|
say(rule(server, "ownerText", OWNER_TEXT_RULE));
|
|
28667
28678
|
for (const line of server.extra) say(line);
|
|
28668
|
-
say(START_FAIL_LINE);
|
|
28679
|
+
say(rule(server, "startFail", START_FAIL_LINE));
|
|
28669
28680
|
ensureDeployaiDir(root);
|
|
28670
28681
|
writeFileSync13(join17(root, START_FILE), `${lines.join("\n")}
|
|
28671
28682
|
`);
|
|
@@ -29950,6 +29961,10 @@ async function main(argv = process.argv) {
|
|
|
29950
29961
|
program.hook("preAction", (_this, actionCmd) => {
|
|
29951
29962
|
command = commandPath(actionCmd);
|
|
29952
29963
|
apiFlag = actionCmd.optsWithGlobals().api;
|
|
29964
|
+
try {
|
|
29965
|
+
refreshAgentScript(process.cwd());
|
|
29966
|
+
} catch {
|
|
29967
|
+
}
|
|
29953
29968
|
});
|
|
29954
29969
|
const exitBefore = process.exitCode;
|
|
29955
29970
|
let result = "success";
|