@oxagen/cli 0.2.3 → 0.3.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/README.md +447 -0
- package/dist/commands/__tests__/cli-parity.test.js +2 -2
- package/dist/commands/__tests__/cli-parity.test.js.map +1 -1
- package/dist/commands/agent.plan.create.d.ts +3 -0
- package/dist/commands/agent.plan.create.d.ts.map +1 -0
- package/dist/commands/agent.plan.create.js +41 -0
- package/dist/commands/agent.plan.create.js.map +1 -0
- package/dist/commands/api-key.create.js +3 -2
- package/dist/commands/api-key.create.js.map +1 -1
- package/dist/commands/api-key.revoke.js +3 -2
- package/dist/commands/api-key.revoke.js.map +1 -1
- package/dist/commands/auth.login.js +2 -1
- package/dist/commands/auth.login.js.map +1 -1
- package/dist/commands/auth.whoami.js +3 -2
- package/dist/commands/auth.whoami.js.map +1 -1
- package/dist/commands/billing.status.js +3 -2
- package/dist/commands/billing.status.js.map +1 -1
- package/dist/commands/chat.send.js +3 -2
- package/dist/commands/chat.send.js.map +1 -1
- package/dist/commands/conversation.archive.js +3 -2
- package/dist/commands/conversation.archive.js.map +1 -1
- package/dist/commands/conversation.delete.js +3 -2
- package/dist/commands/conversation.delete.js.map +1 -1
- package/dist/commands/conversation.list.js +3 -2
- package/dist/commands/conversation.list.js.map +1 -1
- package/dist/commands/conversation.rename.js +3 -2
- package/dist/commands/conversation.rename.js.map +1 -1
- package/dist/commands/documents.generate.js +1 -1
- package/dist/commands/documents.generate.js.map +1 -1
- package/dist/commands/notifications.list.js +3 -2
- package/dist/commands/notifications.list.js.map +1 -1
- package/dist/commands/notifications.mark.js +3 -2
- package/dist/commands/notifications.mark.js.map +1 -1
- package/dist/commands/org.create.js +3 -2
- package/dist/commands/org.create.js.map +1 -1
- package/dist/commands/org.list.js +3 -2
- package/dist/commands/org.list.js.map +1 -1
- package/dist/commands/org.member.add.js +3 -2
- package/dist/commands/org.member.add.js.map +1 -1
- package/dist/commands/org.member.remove.js +3 -2
- package/dist/commands/org.member.remove.js.map +1 -1
- package/dist/commands/plugin.catalog.browse.js +1 -1
- package/dist/commands/plugin.catalog.browse.js.map +1 -1
- package/dist/commands/plugin.install.js +3 -2
- package/dist/commands/plugin.install.js.map +1 -1
- package/dist/commands/plugin.list.js +3 -2
- package/dist/commands/plugin.list.js.map +1 -1
- package/dist/commands/plugin.registry.list.js +1 -1
- package/dist/commands/plugin.registry.list.js.map +1 -1
- package/dist/commands/plugin.uninstall.js +3 -2
- package/dist/commands/plugin.uninstall.js.map +1 -1
- package/dist/commands/privacy.erase.d.ts +3 -0
- package/dist/commands/privacy.erase.d.ts.map +1 -0
- package/dist/commands/privacy.erase.js +60 -0
- package/dist/commands/privacy.erase.js.map +1 -0
- package/dist/commands/privacy.export.d.ts +3 -0
- package/dist/commands/privacy.export.d.ts.map +1 -0
- package/dist/commands/privacy.export.js +36 -0
- package/dist/commands/privacy.export.js.map +1 -0
- package/dist/commands/workspace.create.js +3 -2
- package/dist/commands/workspace.create.js.map +1 -1
- package/dist/commands/workspace.list.js +3 -2
- package/dist/commands/workspace.list.js.map +1 -1
- package/dist/commands/workspace.member.list.d.ts.map +1 -1
- package/dist/commands/workspace.member.list.js +2 -1
- package/dist/commands/workspace.member.list.js.map +1 -1
- package/dist/commands.test.js +472 -0
- package/dist/commands.test.js.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
- package/LICENSE +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const chatSendCommand = new Command("send")
|
|
4
4
|
.description("Send a message to the agent")
|
|
5
5
|
.argument("<message>", "Message to send")
|
|
@@ -23,7 +23,8 @@ export const chatSendCommand = new Command("send")
|
|
|
23
23
|
console.log(`Response: ${response}`);
|
|
24
24
|
}
|
|
25
25
|
catch (err) {
|
|
26
|
-
|
|
26
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
27
|
+
console.error(`Error: ${_msg}`);
|
|
27
28
|
process.exit(1);
|
|
28
29
|
}
|
|
29
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.send.js","sourceRoot":"","sources":["../../src/commands/chat.send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"chat.send.js","sourceRoot":"","sources":["../../src/commands/chat.send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAQzE,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KAC/C,WAAW,CAAC,6BAA6B,CAAC;KAC1C,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;KACxC,MAAM,CAAC,yBAAyB,EAAE,oCAAoC,CAAC;KACvE,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC;KAC3C,MAAM,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;KAC9C,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,OAAoE,EAAE,EAAE;IACtG,WAAW,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,aAAa,OAAO,GAAG,CAAC,CAAC;IACrC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAe,cAAc,EAAE;YAC1D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,OAAO;gBACP,cAAc,EAAE,OAAO,CAAC,YAAY,IAAI,IAAI;gBAC5C,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,SAAS,EAAE,OAAO,CAAC,SAAS;aAC7B,CAAC;SACH,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QACjE,OAAO,CAAC,GAAG,CAAC,aAAa,QAAQ,EAAE,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const conversationArchiveCommand = new Command("archive")
|
|
4
4
|
.description("Archive a conversation")
|
|
5
5
|
.argument("<id>", "Conversation public ID")
|
|
@@ -15,7 +15,8 @@ export const conversationArchiveCommand = new Command("archive")
|
|
|
15
15
|
console.log(`✓ Conversation ${id} ${action}`);
|
|
16
16
|
}
|
|
17
17
|
catch (err) {
|
|
18
|
-
|
|
18
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
19
|
+
console.error(`Error: ${_msg}`);
|
|
19
20
|
process.exit(1);
|
|
20
21
|
}
|
|
21
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.archive.js","sourceRoot":"","sources":["../../src/commands/conversation.archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OA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AC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const conversationDeleteCommand = new Command("delete")
|
|
4
4
|
.description("Soft-delete a conversation")
|
|
5
5
|
.argument("<id>", "Conversation public ID")
|
|
@@ -10,7 +10,8 @@ export const conversationDeleteCommand = new Command("delete")
|
|
|
10
10
|
console.log(`✓ Conversation ${id} deleted`);
|
|
11
11
|
}
|
|
12
12
|
catch (err) {
|
|
13
|
-
|
|
13
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
14
|
+
console.error(`Error: ${_msg}`);
|
|
14
15
|
process.exit(1);
|
|
15
16
|
}
|
|
16
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.delete.js","sourceRoot":"","sources":["../../src/commands/conversation.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.delete.js","sourceRoot":"","sources":["../../src/commands/conversation.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC3D,WAAW,CAAC,4BAA4B,CAAC;KACzC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;KAC1C,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,EAAE;IAC3B,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,kBAAkB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const conversationListCommand = new Command("list")
|
|
4
4
|
.description("List conversations")
|
|
5
5
|
.option("--filter <filter>", "Filter: all | active | archived", "active")
|
|
@@ -24,7 +24,8 @@ export const conversationListCommand = new Command("list")
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
catch (err) {
|
|
27
|
-
|
|
27
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
28
|
+
console.error(`Error: ${_msg}`);
|
|
28
29
|
process.exit(1);
|
|
29
30
|
}
|
|
30
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.list.js","sourceRoot":"","sources":["../../src/commands/conversation.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.list.js","sourceRoot":"","sources":["../../src/commands/conversation.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EA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G,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const conversationRenameCommand = new Command("rename")
|
|
4
4
|
.description("Rename a conversation")
|
|
5
5
|
.argument("<id>", "Conversation public ID")
|
|
@@ -14,7 +14,8 @@ export const conversationRenameCommand = new Command("rename")
|
|
|
14
14
|
console.log(`✓ Conversation ${id} renamed to "${title}"`);
|
|
15
15
|
}
|
|
16
16
|
catch (err) {
|
|
17
|
-
|
|
17
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
18
|
+
console.error(`Error: ${_msg}`);
|
|
18
19
|
process.exit(1);
|
|
19
20
|
}
|
|
20
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.rename.js","sourceRoot":"","sources":["../../src/commands/conversation.rename.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.rename.js","sourceRoot":"","sources":["../../src/commands/conversation.rename.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEzE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KAAK,IAAI,KAAK;aAC9B,CAAC;SACH,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;QACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const notificationsListCommand = new Command("list")
|
|
4
4
|
.description("List notifications")
|
|
5
5
|
.option("--unread", "Show only unread notifications")
|
|
@@ -25,7 +25,8 @@ export const notificationsListCommand = new Command("list")
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
catch (err) {
|
|
28
|
-
|
|
28
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
29
|
+
console.error(`Error: ${_msg}`);
|
|
29
30
|
process.exit(1);
|
|
30
31
|
}
|
|
31
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.list.js","sourceRoot":"","sources":["../../src/commands/notifications.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"notifications.list.js","sourceRoot":"","sources":["../../src/commands/notifications.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAA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AAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const notificationsMarkCommand = new Command("mark")
|
|
4
4
|
.description("Mark a notification as read or unread")
|
|
5
5
|
.argument("<id>", "Notification public ID")
|
|
@@ -15,7 +15,8 @@ export const notificationsMarkCommand = new Command("mark")
|
|
|
15
15
|
console.log(`✓ Notification ${id} marked as ${state}`);
|
|
16
16
|
}
|
|
17
17
|
catch (err) {
|
|
18
|
-
|
|
18
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
19
|
+
console.error(`Error: ${_msg}`);
|
|
19
20
|
process.exit(1);
|
|
20
21
|
}
|
|
21
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.mark.js","sourceRoot":"","sources":["../../src/commands/notifications.mark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"notifications.mark.js","sourceRoot":"","sources":["../../src/commands/notifications.mark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACxD,WAAW,CAAC,uCAAuC,CAAC;KACpD,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;KAC1C,MAAM,CAAC,UAAU,EAAE,wBAAwB,CAAC;KAC5C,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,OAA6B,EAAE,EAAE;IAC1D,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,kBAAkB,EAAE,OAAO,EAAE;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;SAChD,CAAC,CAAC;QACH,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,cAAc,KAAK,EAAE,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const orgCreateCommand = new Command("create")
|
|
4
4
|
.description("Create a new organization")
|
|
5
5
|
.argument("<name>", "Organization name")
|
|
@@ -15,7 +15,8 @@ export const orgCreateCommand = new Command("create")
|
|
|
15
15
|
console.log(`✓ Organization created: ${org?.slug ?? org.slug ?? "unknown"}`);
|
|
16
16
|
}
|
|
17
17
|
catch (err) {
|
|
18
|
-
|
|
18
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
19
|
+
console.error(`Error: ${_msg}`);
|
|
19
20
|
process.exit(1);
|
|
20
21
|
}
|
|
21
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org.create.js","sourceRoot":"","sources":["../../src/commands/org.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"org.create.js","sourceRoot":"","sources":["../../src/commands/org.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAOzE,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAClD,WAAW,CAAC,2BAA2B,CAAC;KACxC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;KACvC,MAAM,CAAC,eAAe,EAAE,uCAAuC,CAAC;KAChE,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,OAA0B,EAAE,EAAE;IACzD,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAc,gBAAgB,EAAE;YAC3D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;SACnD,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,2BAA4B,GAAmC,EAAE,IAAI,IAAK,GAAmB,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC,CAAC;IACjI,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const orgListCommand = new Command("list")
|
|
4
4
|
.description("List organizations")
|
|
5
5
|
.action(async () => {
|
|
@@ -17,7 +17,8 @@ export const orgListCommand = new Command("list")
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
catch (err) {
|
|
20
|
-
|
|
20
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
21
|
+
console.error(`Error: ${_msg}`);
|
|
21
22
|
process.exit(1);
|
|
22
23
|
}
|
|
23
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org.list.js","sourceRoot":"","sources":["../../src/commands/org.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"org.list.js","sourceRoot":"","sources":["../../src/commands/org.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAG,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAa1E,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KAC9C,WAAW,CAAC,oBAAoB,CAAC;KACjC,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAe,gBAAgB,CAAC,CAAC;QAC9D,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QACnD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YACvC,OAAO;QACT,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,SAAS,KAAK,GAAG,CAAC,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const orgMemberAddCommand = new Command("add")
|
|
4
4
|
.description("Add a member to the organization")
|
|
5
5
|
.argument("<email>", "Member email address")
|
|
@@ -15,7 +15,8 @@ export const orgMemberAddCommand = new Command("add")
|
|
|
15
15
|
console.log(`✓ Added ${email} as ${options.role ?? "member"}`);
|
|
16
16
|
}
|
|
17
17
|
catch (err) {
|
|
18
|
-
|
|
18
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
19
|
+
console.error(`Error: ${_msg}`);
|
|
19
20
|
process.exit(1);
|
|
20
21
|
}
|
|
21
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org.member.add.js","sourceRoot":"","sources":["../../src/commands/org.member.add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"org.member.add.js","sourceRoot":"","sources":["../../src/commands/org.member.add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;KAClD,WAAW,CAAC,kCAAkC,CAAC;KAC/C,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;KAC3C,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC;KAC3C,MAAM,CAAC,eAAe,EAAE,sCAAsC,EAAE,QAAQ,CAAC;KACzE,MAAM,CAAC,KAAK,EAAE,KAAa,EAAE,OAAwC,EAAE,EAAE;IACxE,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,cAAc,EAAE;YAC/B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;SACtE,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,OAAO,OAAO,CAAC,IAAI,IAAI,QAAQ,EAAE,CAAC,CAAC;IACjE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const orgMemberRemoveCommand = new Command("remove")
|
|
4
4
|
.description("Remove a member from the organization")
|
|
5
5
|
.argument("<email>", "Member email address")
|
|
@@ -14,7 +14,8 @@ export const orgMemberRemoveCommand = new Command("remove")
|
|
|
14
14
|
console.log(`✓ Removed ${email} from organization`);
|
|
15
15
|
}
|
|
16
16
|
catch (err) {
|
|
17
|
-
|
|
17
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
18
|
+
console.error(`Error: ${_msg}`);
|
|
18
19
|
process.exit(1);
|
|
19
20
|
}
|
|
20
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org.member.remove.js","sourceRoot":"","sources":["../../src/commands/org.member.remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"org.member.remove.js","sourceRoot":"","sources":["../../src/commands/org.member.remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KACxD,WAAW,CAAC,uCAAuC,CAAC;KACpD,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;KAC3C,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC;KAC3C,MAAM,CAAC,KAAK,EAAE,KAAa,EAAE,OAAyB,EAAE,EAAE;IACzD,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,cAAc,EAAE;YAC/B,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;SAClD,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,oBAAoB,CAAC,CAAC;IACtD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@ export const pluginCatalogBrowseCommand = new Command("browse")
|
|
|
6
6
|
.option("-q, --query <search>", "Search query")
|
|
7
7
|
.option("-p, --page <n>", "Page number", "1")
|
|
8
8
|
.option("-l, --limit <n>", "Results per page", "20")
|
|
9
|
-
.action(async (
|
|
9
|
+
.action(async (_options) => {
|
|
10
10
|
try {
|
|
11
11
|
const result = await apiRequest("/plugin/catalog/browse", {
|
|
12
12
|
method: "GET",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.catalog.browse.js","sourceRoot":"","sources":["../../src/commands/plugin.catalog.browse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC5D,WAAW,CAAC,2BAA2B,CAAC;KACxC,MAAM,CAAC,2BAA2B,EAAE,oBAAoB,CAAC;KACzD,MAAM,CAAC,sBAAsB,EAAE,cAAc,CAAC;KAC9C,MAAM,CAAC,gBAAgB,EAAE,aAAa,EAAE,GAAG,CAAC;KAC5C,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,IAAI,CAAC;KACnD,MAAM,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin.catalog.browse.js","sourceRoot":"","sources":["../../src/commands/plugin.catalog.browse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC5D,WAAW,CAAC,2BAA2B,CAAC;KACxC,MAAM,CAAC,2BAA2B,EAAE,oBAAoB,CAAC;KACzD,MAAM,CAAC,sBAAsB,EAAE,cAAc,CAAC;KAC9C,MAAM,CAAC,gBAAgB,EAAE,aAAa,EAAE,GAAG,CAAC;KAC5C,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,IAAI,CAAC;KACnD,MAAM,CAAC,KAAK,EAAE,QAAiC,EAAE,EAAE;IAClD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,wBAAwB,EAAE;YACxD,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const pluginInstallCommand = new Command("install")
|
|
4
4
|
.description("Install a plugin")
|
|
5
5
|
.argument("<id>", "Plugin ID from catalog")
|
|
@@ -14,7 +14,8 @@ export const pluginInstallCommand = new Command("install")
|
|
|
14
14
|
console.log(`✓ Plugin ${id} installed`);
|
|
15
15
|
}
|
|
16
16
|
catch (err) {
|
|
17
|
-
|
|
17
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
18
|
+
console.error(`Error: ${_msg}`);
|
|
18
19
|
process.exit(1);
|
|
19
20
|
}
|
|
20
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.install.js","sourceRoot":"","sources":["../../src/commands/plugin.install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.install.js","sourceRoot":"","sources":["../../src/commands/plugin.install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC;KACvD,WAAW,CAAC,kBAAkB,CAAC;KAC/B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;KAC1C,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC;KAC3C,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,OAAyB,EAAE,EAAE;IACtD,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,kBAAkB,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;SACzD,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const pluginListCommand = new Command("list")
|
|
4
4
|
.description("List installed plugins")
|
|
5
5
|
.option("--org <slug>", "Organization slug")
|
|
@@ -20,7 +20,8 @@ export const pluginListCommand = new Command("list")
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
catch (err) {
|
|
23
|
-
|
|
23
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
24
|
+
console.error(`Error: ${_msg}`);
|
|
24
25
|
process.exit(1);
|
|
25
26
|
}
|
|
26
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.list.js","sourceRoot":"","sources":["../../src/commands/plugin.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.list.js","sourceRoot":"","sources":["../../src/commands/plugin.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAG,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAc1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACjD,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC;KAC3C,MAAM,CAAC,KAAK,EAAE,OAAyB,EAAE,EAAE;IAC1C,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,GAAG,MAAM,UAAU,CAAkB,WAAW,EAAE,EAAE,CAAC,CAAC;QAChE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAChD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;YACrC,OAAO;QACT,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACxB,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;YAClD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,EAAE,IAAI,SAAS,KAAK,MAAM,GAAG,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { apiRequest } from "../lib/api-client.js";
|
|
|
3
3
|
export const pluginRegistryListCommand = new Command("list")
|
|
4
4
|
.description("List available plugin registries")
|
|
5
5
|
.option("-o, --org-scoped", "Show only org-scoped registries")
|
|
6
|
-
.action(async (
|
|
6
|
+
.action(async (_options) => {
|
|
7
7
|
try {
|
|
8
8
|
const result = await apiRequest("/plugin/registry/list", {
|
|
9
9
|
method: "GET",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.registry.list.js","sourceRoot":"","sources":["../../src/commands/plugin.registry.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACzD,WAAW,CAAC,kCAAkC,CAAC;KAC/C,MAAM,CAAC,kBAAkB,EAAE,iCAAiC,CAAC;KAC7D,MAAM,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin.registry.list.js","sourceRoot":"","sources":["../../src/commands/plugin.registry.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACzD,WAAW,CAAC,kCAAkC,CAAC;KAC/C,MAAM,CAAC,kBAAkB,EAAE,iCAAiC,CAAC;KAC7D,MAAM,CAAC,KAAK,EAAE,QAAiC,EAAE,EAAE;IAClD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,uBAAuB,EAAE;YACvD,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const pluginUninstallCommand = new Command("uninstall")
|
|
4
4
|
.description("Uninstall a plugin")
|
|
5
5
|
.argument("<id>", "Plugin ID to uninstall")
|
|
@@ -14,7 +14,8 @@ export const pluginUninstallCommand = new Command("uninstall")
|
|
|
14
14
|
console.log(`✓ Plugin ${id} uninstalled`);
|
|
15
15
|
}
|
|
16
16
|
catch (err) {
|
|
17
|
-
|
|
17
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
18
|
+
console.error(`Error: ${_msg}`);
|
|
18
19
|
process.exit(1);
|
|
19
20
|
}
|
|
20
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.uninstall.js","sourceRoot":"","sources":["../../src/commands/plugin.uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.uninstall.js","sourceRoot":"","sources":["../../src/commands/plugin.uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC;KAC3D,WAAW,CAAC,oBAAoB,CAAC;KACjC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;KAC1C,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC;KAC3C,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,OAAyB,EAAE,EAAE;IACtD,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,oBAAoB,EAAE;YACrC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;SACzD,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy.erase.d.ts","sourceRoot":"","sources":["../../src/commands/privacy.erase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,eAAO,MAAM,mBAAmB,SAiD5B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import * as readline from "node:readline";
|
|
3
|
+
import { apiRequest, ApiError } from "../lib/api-client.js";
|
|
4
|
+
async function promptConfirm(message) {
|
|
5
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
|
|
6
|
+
return new Promise((resolve) => {
|
|
7
|
+
rl.question(message, (answer) => {
|
|
8
|
+
rl.close();
|
|
9
|
+
resolve(answer.trim() === "CONFIRM");
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export const privacyEraseCommand = new Command("erase")
|
|
14
|
+
.description("Request GDPR Art.17 data erasure (irreversible — requires confirmation)")
|
|
15
|
+
.option("-s, --scope <scope>", "Erasure scope: user (default) or org", "user")
|
|
16
|
+
.option("--org-id <id>", "Organization ID (required when --scope=org)")
|
|
17
|
+
.option("-y, --yes", "Skip interactive confirmation (CI use only)")
|
|
18
|
+
.action(async (options) => {
|
|
19
|
+
if (options.scope !== "user" && options.scope !== "org") {
|
|
20
|
+
console.error("Error: --scope must be 'user' or 'org'");
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
if (options.scope === "org" && !options.orgId) {
|
|
24
|
+
console.error("Error: --org-id is required when --scope=org");
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
if (!options.yes) {
|
|
28
|
+
const scopeLabel = options.scope === "org"
|
|
29
|
+
? `organization ${options.orgId}`
|
|
30
|
+
: "your account";
|
|
31
|
+
console.error(`\nWARNING: This will permanently erase all data for ${scopeLabel}.`);
|
|
32
|
+
console.error("Sessions will be revoked immediately. Data deletion is scheduled asynchronously.\n");
|
|
33
|
+
const confirmed = await promptConfirm("Type CONFIRM to proceed (anything else cancels): ");
|
|
34
|
+
if (!confirmed) {
|
|
35
|
+
console.error("Cancelled.");
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
const data = await apiRequest("/privacy/erase", {
|
|
41
|
+
method: "POST",
|
|
42
|
+
body: JSON.stringify({
|
|
43
|
+
scope: options.scope,
|
|
44
|
+
confirm: true,
|
|
45
|
+
...(options.orgId ? { orgId: options.orgId } : {}),
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
48
|
+
console.log(`Erasure request submitted. Request ID: ${data.requestId}`);
|
|
49
|
+
console.log(`Status: ${data.status}`);
|
|
50
|
+
if (process.stdout.isTTY) {
|
|
51
|
+
console.log(`Scheduled: ${data.effectiveAt}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
const msg = err instanceof ApiError ? err.message : String(err);
|
|
56
|
+
console.error(`Error: ${msg}`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=privacy.erase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy.erase.js","sourceRoot":"","sources":["../../src/commands/privacy.erase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;A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MAAM,GAAG,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChE,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy.export.d.ts","sourceRoot":"","sources":["../../src/commands/privacy.export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,eAAO,MAAM,oBAAoB,SA+B7B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { apiRequest, ApiError } from "../lib/api-client.js";
|
|
3
|
+
export const privacyExportCommand = new Command("export")
|
|
4
|
+
.description("Request a GDPR Art.20 data export (ZIP archive)")
|
|
5
|
+
.option("-s, --scope <scope>", "Export scope: user (default) or org", "user")
|
|
6
|
+
.option("--org-id <id>", "Organization ID (required when --scope=org)")
|
|
7
|
+
.action(async (options) => {
|
|
8
|
+
if (options.scope !== "user" && options.scope !== "org") {
|
|
9
|
+
console.error("Error: --scope must be 'user' or 'org'");
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
if (options.scope === "org" && !options.orgId) {
|
|
13
|
+
console.error("Error: --org-id is required when --scope=org");
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const data = await apiRequest("/privacy/export", {
|
|
18
|
+
method: "POST",
|
|
19
|
+
body: JSON.stringify({
|
|
20
|
+
scope: options.scope,
|
|
21
|
+
...(options.orgId ? { orgId: options.orgId } : {}),
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
console.log(`Export queued. Export ID: ${data.exportId}`);
|
|
25
|
+
console.log(`Status: ${data.status}`);
|
|
26
|
+
if (process.stdout.isTTY) {
|
|
27
|
+
console.log(`Poll status: oxagen privacy export:status --export-id ${data.exportId}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
const msg = err instanceof ApiError ? err.message : String(err);
|
|
32
|
+
console.error(`Error: ${msg}`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=privacy.export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy.export.js","sourceRoot":"","sources":["../../src/commands/privacy.export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAQ5D,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KACtD,WAAW,CAAC,iDAAiD,CAAC;KAC9D,MAAM,CAAC,qBAAqB,EAAE,qCAAqC,EAAE,MAAM,CAAC;KAC5E,MAAM,CAAC,eAAe,EAAE,6CAA6C,CAAC;KACtE,MAAM,CAAC,KAAK,EAAE,OAA0C,EAAE,EAAE;IAC3D,IAAI,OAAO,CAAC,KAAK,KAAK,MAAM,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;QACxD,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC9C,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAiB,iBAAiB,EAAE;YAC/D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACnD,CAAC;SACH,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACtC,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YACzB,OAAO,CAAC,GAAG,CAAC,yDAAyD,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChE,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const workspaceCreateCommand = new Command("create")
|
|
4
4
|
.description("Create a new workspace")
|
|
5
5
|
.argument("<name>", "Workspace name")
|
|
@@ -16,7 +16,8 @@ export const workspaceCreateCommand = new Command("create")
|
|
|
16
16
|
console.log(`✓ Workspace created: ${ws?.slug ?? ws.slug ?? "unknown"}`);
|
|
17
17
|
}
|
|
18
18
|
catch (err) {
|
|
19
|
-
|
|
19
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
20
|
+
console.error(`Error: ${_msg}`);
|
|
20
21
|
process.exit(1);
|
|
21
22
|
}
|
|
22
23
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.create.js","sourceRoot":"","sources":["../../src/commands/workspace.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace.create.js","sourceRoot":"","sources":["../../src/commands/workspace.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAQzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KACxD,WAAW,CAAC,wBAAwB,CAAC;KACrC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;KACpC,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC;KAC3C,MAAM,CAAC,eAAe,EAAE,6CAA6C,CAAC;KACtE,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,OAAwC,EAAE,EAAE;IACvE,WAAW,EAAE,CAAC;IACd,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAoB,aAAa,EAAE;YAC9D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;SACrE,CAAC,CAAC;QACH,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,wBAAyB,EAAqC,EAAE,IAAI,IAAK,EAAwB,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC,CAAC;IACrI,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,GAAG,YAAY,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { apiRequest, requireAuth } from "../lib/api-client.js";
|
|
2
|
+
import { apiRequest, requireAuth, ApiError } from "../lib/api-client.js";
|
|
3
3
|
export const workspaceListCommand = new Command("list")
|
|
4
4
|
.description("List workspaces in current organization")
|
|
5
5
|
.option("--org <slug>", "Organization slug")
|
|
@@ -19,7 +19,8 @@ export const workspaceListCommand = new Command("list")
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
catch (err) {
|
|
22
|
-
|
|
22
|
+
const _msg = err instanceof ApiError ? err.message : String(err);
|
|
23
|
+
console.error(`Error: ${_msg}`);
|
|
23
24
|
process.exit(1);
|
|
24
25
|
}
|
|
25
26
|
});
|