@walkeros/cli 3.0.0 → 3.0.2
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/CHANGELOG.md +16 -0
- package/dist/cli.js +75 -1
- package/dist/index.d.ts +113 -86
- package/dist/index.js +78 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @walkeros/cli
|
|
2
2
|
|
|
3
|
+
## 3.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- afd4d07: Add feedback command and MCP tool for sending user feedback
|
|
8
|
+
- @walkeros/core@3.0.2
|
|
9
|
+
- @walkeros/server-core@3.0.2
|
|
10
|
+
|
|
11
|
+
## 3.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 86c81d1: Regenerate OpenAPI spec and types from app v3
|
|
16
|
+
- @walkeros/core@3.0.1
|
|
17
|
+
- @walkeros/server-core@3.0.1
|
|
18
|
+
|
|
3
19
|
## 3.0.0
|
|
4
20
|
|
|
5
21
|
### Major Changes
|
package/dist/cli.js
CHANGED
|
@@ -18169,7 +18169,7 @@ function rn2(n3, e4) {
|
|
|
18169
18169
|
}, () => J3({ ok: false }))(), "Push", n3.hooks);
|
|
18170
18170
|
}
|
|
18171
18171
|
async function un2(n3) {
|
|
18172
|
-
const e4 = W({ globalsStatic: {}, sessionStatic: {}, tagging: 0, run: true }, n3, { merge: false, extend: false }), t2 = { level: n3.logger?.level, handler: n3.logger?.handler }, o2 = de(t2), s3 = { ...e4.globalsStatic, ...n3.globals }, a3 = { allowed: false, config: e4, consent: n3.consent || {}, count: 0, custom: n3.custom || {}, destinations: {}, transformers: {}, stores: {}, globals: s3, group: "", hooks: {}, logger: o2, on: {}, queue: [], round: 0, session: void 0, status: { startedAt: Date.now(), in: 0, out: 0, failed: 0, sources: {}, destinations: {} }, timing: Date.now(), user: n3.user || {}, version: "
|
|
18172
|
+
const e4 = W({ globalsStatic: {}, sessionStatic: {}, tagging: 0, run: true }, n3, { merge: false, extend: false }), t2 = { level: n3.logger?.level, handler: n3.logger?.handler }, o2 = de(t2), s3 = { ...e4.globalsStatic, ...n3.globals }, a3 = { allowed: false, config: e4, consent: n3.consent || {}, count: 0, custom: n3.custom || {}, destinations: {}, transformers: {}, stores: {}, globals: s3, group: "", hooks: {}, logger: o2, on: {}, queue: [], round: 0, session: void 0, status: { startedAt: Date.now(), in: 0, out: 0, failed: 0, sources: {}, destinations: {} }, timing: Date.now(), user: n3.user || {}, version: "3.0.1", sources: {}, pending: { sources: {}, destinations: {} }, push: void 0, command: void 0 };
|
|
18173
18173
|
a3.push = rn2(a3, (n4) => ({ timing: Math.round((Date.now() - a3.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...n4 })), a3.command = (function(n4, e5) {
|
|
18174
18174
|
return Te(async (t3, o3, s4) => await he(async () => await e5(n4, t3, o3, s4), () => J3({ ok: false }))(), "Command", n4.hooks);
|
|
18175
18175
|
})(a3, Y3);
|
|
@@ -21619,6 +21619,77 @@ async function createDeployCommand(config2, options) {
|
|
|
21619
21619
|
}
|
|
21620
21620
|
}
|
|
21621
21621
|
|
|
21622
|
+
// src/commands/feedback/index.ts
|
|
21623
|
+
init_config_file();
|
|
21624
|
+
init_cli_logger();
|
|
21625
|
+
import { createInterface } from "readline";
|
|
21626
|
+
async function feedback(text, options) {
|
|
21627
|
+
const config2 = readConfig();
|
|
21628
|
+
const anonymous = options?.anonymous ?? config2?.anonymousFeedback ?? true;
|
|
21629
|
+
const payload = { text };
|
|
21630
|
+
if (!anonymous && config2?.email) {
|
|
21631
|
+
payload.userId = config2.email;
|
|
21632
|
+
const projectId = process.env.WALKEROS_PROJECT_ID;
|
|
21633
|
+
if (projectId) {
|
|
21634
|
+
payload.projectId = projectId;
|
|
21635
|
+
}
|
|
21636
|
+
}
|
|
21637
|
+
const appUrl = resolveAppUrl();
|
|
21638
|
+
const response = await fetch(`${appUrl}/api/feedback`, {
|
|
21639
|
+
method: "POST",
|
|
21640
|
+
headers: { "Content-Type": "application/json" },
|
|
21641
|
+
body: JSON.stringify(payload)
|
|
21642
|
+
});
|
|
21643
|
+
if (!response.ok) {
|
|
21644
|
+
throw new Error(
|
|
21645
|
+
`Feedback submission failed: ${response.status} ${response.statusText}`
|
|
21646
|
+
);
|
|
21647
|
+
}
|
|
21648
|
+
}
|
|
21649
|
+
async function feedbackCommand(text) {
|
|
21650
|
+
const logger = createCLILogger({});
|
|
21651
|
+
try {
|
|
21652
|
+
const config2 = readConfig();
|
|
21653
|
+
let anonymous;
|
|
21654
|
+
if (config2?.anonymousFeedback === void 0) {
|
|
21655
|
+
const answer = await promptUser(
|
|
21656
|
+
"Include your user and project info with feedback? (y/N) "
|
|
21657
|
+
);
|
|
21658
|
+
const anonymousFeedback = !answer.toLowerCase().startsWith("y");
|
|
21659
|
+
if (config2) {
|
|
21660
|
+
writeConfig({ ...config2, anonymousFeedback });
|
|
21661
|
+
} else {
|
|
21662
|
+
writeConfig({
|
|
21663
|
+
token: "",
|
|
21664
|
+
email: "",
|
|
21665
|
+
appUrl: "",
|
|
21666
|
+
anonymousFeedback
|
|
21667
|
+
});
|
|
21668
|
+
}
|
|
21669
|
+
anonymous = anonymousFeedback;
|
|
21670
|
+
} else {
|
|
21671
|
+
anonymous = config2.anonymousFeedback;
|
|
21672
|
+
}
|
|
21673
|
+
await feedback(text, { anonymous });
|
|
21674
|
+
logger.info("Feedback sent. Thanks!");
|
|
21675
|
+
} catch (error48) {
|
|
21676
|
+
logger.error(error48 instanceof Error ? error48.message : String(error48));
|
|
21677
|
+
process.exit(1);
|
|
21678
|
+
}
|
|
21679
|
+
}
|
|
21680
|
+
function promptUser(question) {
|
|
21681
|
+
return new Promise((resolve2) => {
|
|
21682
|
+
const rl = createInterface({
|
|
21683
|
+
input: process.stdin,
|
|
21684
|
+
output: process.stderr
|
|
21685
|
+
});
|
|
21686
|
+
rl.question(question, (answer) => {
|
|
21687
|
+
rl.close();
|
|
21688
|
+
resolve2(answer);
|
|
21689
|
+
});
|
|
21690
|
+
});
|
|
21691
|
+
}
|
|
21692
|
+
|
|
21622
21693
|
// src/cli.ts
|
|
21623
21694
|
var program = new Command();
|
|
21624
21695
|
program.name("walkeros").description("walkerOS CLI - Bundle and deploy walkerOS components").version(VERSION);
|
|
@@ -21783,6 +21854,9 @@ program.command("run [file]").description("Run a walkerOS flow").option("-f, --f
|
|
|
21783
21854
|
silent: options.silent
|
|
21784
21855
|
});
|
|
21785
21856
|
});
|
|
21857
|
+
program.command("feedback <text>").description("Send feedback to walkerOS").action(async (text) => {
|
|
21858
|
+
await feedbackCommand(text);
|
|
21859
|
+
});
|
|
21786
21860
|
registerCacheCommand(program);
|
|
21787
21861
|
if (process.argv.length <= 2) {
|
|
21788
21862
|
printBanner(VERSION);
|