@hasna/connectors 0.7.0 → 0.7.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/bin/index.js +1 -1
- package/bin/mcp.js +1 -1
- package/connectors/connect-gmail/src/cli/index.ts +43 -2
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -7545,7 +7545,7 @@ var PRESETS = {
|
|
|
7545
7545
|
commerce: { description: "Commerce and finance", connectors: ["stripe", "shopify", "revolut", "mercury", "pandadoc"] }
|
|
7546
7546
|
};
|
|
7547
7547
|
var program2 = new Command;
|
|
7548
|
-
program2.name("connectors").description("Install API connectors for your project").version("0.7.
|
|
7548
|
+
program2.name("connectors").description("Install API connectors for your project").version("0.7.1").enablePositionalOptions();
|
|
7549
7549
|
program2.command("interactive", { isDefault: true }).alias("i").description("Interactive connector browser").action(() => {
|
|
7550
7550
|
if (!isTTY) {
|
|
7551
7551
|
console.log(`Non-interactive environment detected. Use a subcommand:
|
package/bin/mcp.js
CHANGED
|
@@ -21013,7 +21013,7 @@ async function getConnectorCommandHelp(name, command) {
|
|
|
21013
21013
|
loadConnectorVersions();
|
|
21014
21014
|
var server = new McpServer({
|
|
21015
21015
|
name: "connectors",
|
|
21016
|
-
version: "0.7.
|
|
21016
|
+
version: "0.7.1"
|
|
21017
21017
|
});
|
|
21018
21018
|
server.registerTool("search_connectors", {
|
|
21019
21019
|
title: "Search Connectors",
|
|
@@ -747,6 +747,7 @@ labelsCmd
|
|
|
747
747
|
type: l.type,
|
|
748
748
|
messagesTotal: l.messagesTotal,
|
|
749
749
|
messagesUnread: l.messagesUnread,
|
|
750
|
+
...(l.color ? { backgroundColor: l.color.backgroundColor, textColor: l.color.textColor } : {}),
|
|
750
751
|
}));
|
|
751
752
|
|
|
752
753
|
print(labels, getFormat(labelsCmd));
|
|
@@ -759,12 +760,52 @@ labelsCmd
|
|
|
759
760
|
labelsCmd
|
|
760
761
|
.command('create <name>')
|
|
761
762
|
.description('Create a new label')
|
|
762
|
-
.
|
|
763
|
+
.option('--bg-color <hex>', 'Background color (e.g. #16a765)')
|
|
764
|
+
.option('--text-color <hex>', 'Text color (e.g. #ffffff)')
|
|
765
|
+
.action(async (name: string, opts: { bgColor?: string; textColor?: string }) => {
|
|
763
766
|
try {
|
|
764
767
|
const gmail = requireAuth();
|
|
765
|
-
const label = await gmail.labels.create({
|
|
768
|
+
const label = await gmail.labels.create({
|
|
769
|
+
name,
|
|
770
|
+
backgroundColor: opts.bgColor,
|
|
771
|
+
textColor: opts.textColor,
|
|
772
|
+
});
|
|
766
773
|
success(`Label "${name}" created`);
|
|
767
774
|
info(`Label ID: ${label.id}`);
|
|
775
|
+
if (label.color) {
|
|
776
|
+
info(`Color: bg=${label.color.backgroundColor} text=${label.color.textColor}`);
|
|
777
|
+
}
|
|
778
|
+
} catch (err) {
|
|
779
|
+
error(String(err));
|
|
780
|
+
process.exit(1);
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
labelsCmd
|
|
785
|
+
.command('update <labelId>')
|
|
786
|
+
.description('Update a label name and/or color')
|
|
787
|
+
.option('--name <name>', 'New label name')
|
|
788
|
+
.option('--bg-color <hex>', 'Background color (e.g. #16a765)')
|
|
789
|
+
.option('--text-color <hex>', 'Text color (e.g. #ffffff)')
|
|
790
|
+
.action(async (labelId: string, opts: { name?: string; bgColor?: string; textColor?: string }) => {
|
|
791
|
+
try {
|
|
792
|
+
if (!opts.name && !opts.bgColor && !opts.textColor) {
|
|
793
|
+
error('At least one of --name, --bg-color, or --text-color is required');
|
|
794
|
+
process.exit(1);
|
|
795
|
+
}
|
|
796
|
+
const gmail = requireAuth();
|
|
797
|
+
const label = await gmail.labels.update(labelId, {
|
|
798
|
+
name: opts.name,
|
|
799
|
+
backgroundColor: opts.bgColor,
|
|
800
|
+
textColor: opts.textColor,
|
|
801
|
+
});
|
|
802
|
+
success(`Label ${labelId} updated`);
|
|
803
|
+
if (label.name) {
|
|
804
|
+
info(`Name: ${label.name}`);
|
|
805
|
+
}
|
|
806
|
+
if (label.color) {
|
|
807
|
+
info(`Color: bg=${label.color.backgroundColor} text=${label.color.textColor}`);
|
|
808
|
+
}
|
|
768
809
|
} catch (err) {
|
|
769
810
|
error(String(err));
|
|
770
811
|
process.exit(1);
|