@great-detail/support-cli 0.2.0 → 0.2.1
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/cli.js +1 -1
- package/package.json +2 -4
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{Command
|
|
2
|
+
import {Command}from'commander';import {Client}from'@great-detail/support-sdk';function i({client:t}){let o=new Command("actions").description("Actions");return o.addCommand(new Command("list").description("List actions").action(async()=>{let n=await t.action.list().json();console.log(n);})),o}function m({client:t}){let o=new Command("channels").description("Channels");return o.addCommand(new Command("list").description("List channels").action(async()=>{let n=await t.channel.list().json();console.log(n);})),o}function c({client:t}){let o=new Command("contacts").description("Contacts");return o.addCommand(new Command("get").description("Find contact").argument("<contact>","Contact ID").action(async n=>{let s=await t.contact.get(n).json();console.log(s);})),o.addCommand(new Command("list").description("List contacts").action(async()=>{let n=await t.contact.list().json();console.log(n);})),o.addCommand(new Command("get-vcf").description("Export Contact as VCF").argument("<contact>","Contact ID").action(async n=>{let s=await t.contact.getVCF(n).response();console.log(s);})),o}function d({client:t}){let o=new Command("conversations").description("Conversations");return o.addCommand(new Command("get").description("Find conversation").argument("<conversation>","Conversation ID").action(async n=>{let s=await t.conversation.get(n).json();console.log(s);})),o.addCommand(new Command("list").description("List conversations").action(async()=>{let n=await t.conversation.list().json();console.log(n);})),o}function l({client:t}){let o=new Command("labels").description("Labels");return o.addCommand(new Command("get").description("Find label").argument("<label>","Label ID").action(async n=>{let s=await t.label.get(n).json();console.log(s);})),o.addCommand(new Command("list").description("List labels").action(async()=>{let n=await t.label.list().json();console.log(n);})),o}function u({client:t}){let o=new Command("messages").description("Messages");return o.addCommand(new Command("list").description("List messages").action(async()=>{let n=await t.message.list().json();console.log(n);})),o}function f({client:t}){let o=new Command("sources").description("Sources");return o.addCommand(new Command("get").description("Find source").argument("<source>","Source ID").action(async n=>{let s=await t.source.get(n).json();console.log(s);})),o.addCommand(new Command("list").description("List sources").action(async()=>{let n=await t.source.list().json();console.log(n);})),o}var a={client:new Client(new Client.PublicAuthentication)},v=new Command("gds").description("Great Detail Support System").addCommand(i(a)).addCommand(m(a)).addCommand(c(a)).addCommand(d(a)).addCommand(l(a)).addCommand(u(a)).addCommand(f(a)),x=v;x.parseAsync(process.argv);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@great-detail/support-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for the Great Detail Support System",
|
|
6
6
|
"author": "Great Detail Ltd <info@greatdetail.com>",
|
|
@@ -26,9 +26,7 @@
|
|
|
26
26
|
"@great-detail/support-sdk": ""
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@great-detail/eslint-config": "^1.1.0",
|
|
30
29
|
"@types/node": "^24.1.0",
|
|
31
|
-
"cobertura": "^1.0.3",
|
|
32
30
|
"publint": "^0.3.12",
|
|
33
31
|
"tsup": "^8.5.0",
|
|
34
32
|
"tsx": "^4.19.4",
|
|
@@ -39,7 +37,7 @@
|
|
|
39
37
|
"provenance": false
|
|
40
38
|
},
|
|
41
39
|
"scripts": {
|
|
42
|
-
"build": "tsup src/entrypoint/cli.ts --format esm --minify",
|
|
40
|
+
"build": "tsup src/entrypoint/cli.ts --format esm --minify --splitting --treeshake",
|
|
43
41
|
"test": "node --import tsx --test --experimental-test-coverage src/__tests__/**/*.test.ts src/__tests__/*.test.ts",
|
|
44
42
|
"typecheck": "tsc --noEmit"
|
|
45
43
|
}
|