@hasna/connectors 0.5.8 → 0.5.9
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 +57 -1
- package/bin/mcp.js +57 -1
- package/bin/serve.js +56 -0
- package/connectors/connect-chargebee/.env.example +11 -0
- package/connectors/connect-chargebee/CLAUDE.md +272 -0
- package/connectors/connect-chargebee/README.md +193 -0
- package/connectors/connect-chargebee/package.json +51 -0
- package/connectors/connect-chargebee/scripts/release.ts +179 -0
- package/connectors/connect-chargebee/src/api/client.ts +213 -0
- package/connectors/connect-chargebee/src/api/example.ts +48 -0
- package/connectors/connect-chargebee/src/api/index.ts +51 -0
- package/connectors/connect-chargebee/src/cli/index.ts +254 -0
- package/connectors/connect-chargebee/src/index.ts +103 -0
- package/connectors/connect-chargebee/src/types/index.ts +237 -0
- package/connectors/connect-chargebee/src/utils/auth.ts +274 -0
- package/connectors/connect-chargebee/src/utils/bulk.ts +212 -0
- package/connectors/connect-chargebee/src/utils/config.ts +326 -0
- package/connectors/connect-chargebee/src/utils/output.ts +175 -0
- package/connectors/connect-chargebee/src/utils/settings.ts +114 -0
- package/connectors/connect-chargebee/src/utils/storage.ts +198 -0
- package/connectors/connect-chargebee/tsconfig.json +16 -0
- package/connectors/connect-databricks/.env.example +11 -0
- package/connectors/connect-databricks/CLAUDE.md +272 -0
- package/connectors/connect-databricks/README.md +193 -0
- package/connectors/connect-databricks/package.json +51 -0
- package/connectors/connect-databricks/scripts/release.ts +179 -0
- package/connectors/connect-databricks/src/api/client.ts +213 -0
- package/connectors/connect-databricks/src/api/example.ts +48 -0
- package/connectors/connect-databricks/src/api/index.ts +51 -0
- package/connectors/connect-databricks/src/cli/index.ts +254 -0
- package/connectors/connect-databricks/src/index.ts +103 -0
- package/connectors/connect-databricks/src/types/index.ts +237 -0
- package/connectors/connect-databricks/src/utils/auth.ts +274 -0
- package/connectors/connect-databricks/src/utils/bulk.ts +212 -0
- package/connectors/connect-databricks/src/utils/config.ts +326 -0
- package/connectors/connect-databricks/src/utils/output.ts +175 -0
- package/connectors/connect-databricks/src/utils/settings.ts +114 -0
- package/connectors/connect-databricks/src/utils/storage.ts +198 -0
- package/connectors/connect-databricks/tsconfig.json +16 -0
- package/connectors/connect-datadog/.env.example +11 -0
- package/connectors/connect-datadog/CLAUDE.md +170 -0
- package/connectors/connect-datadog/README.md +193 -0
- package/connectors/connect-datadog/package.json +53 -0
- package/connectors/connect-datadog/src/api/client.ts +150 -0
- package/connectors/connect-datadog/src/api/index.ts +537 -0
- package/connectors/connect-datadog/src/cli/index.ts +958 -0
- package/connectors/connect-datadog/src/index.ts +26 -0
- package/connectors/connect-datadog/src/types/index.ts +654 -0
- package/connectors/connect-datadog/src/utils/config.ts +219 -0
- package/connectors/connect-datadog/src/utils/output.ts +119 -0
- package/connectors/connect-datadog/tsconfig.json +16 -0
- package/connectors/connect-fathom/.env.example +11 -0
- package/connectors/connect-fathom/CLAUDE.md +272 -0
- package/connectors/connect-fathom/README.md +193 -0
- package/connectors/connect-fathom/package.json +51 -0
- package/connectors/connect-fathom/scripts/release.ts +179 -0
- package/connectors/connect-fathom/src/api/client.ts +213 -0
- package/connectors/connect-fathom/src/api/example.ts +48 -0
- package/connectors/connect-fathom/src/api/index.ts +51 -0
- package/connectors/connect-fathom/src/cli/index.ts +254 -0
- package/connectors/connect-fathom/src/index.ts +103 -0
- package/connectors/connect-fathom/src/types/index.ts +237 -0
- package/connectors/connect-fathom/src/utils/auth.ts +274 -0
- package/connectors/connect-fathom/src/utils/bulk.ts +212 -0
- package/connectors/connect-fathom/src/utils/config.ts +326 -0
- package/connectors/connect-fathom/src/utils/output.ts +175 -0
- package/connectors/connect-fathom/src/utils/settings.ts +114 -0
- package/connectors/connect-fathom/src/utils/storage.ts +198 -0
- package/connectors/connect-fathom/tsconfig.json +16 -0
- package/connectors/connect-grafana/.env.example +11 -0
- package/connectors/connect-grafana/CLAUDE.md +272 -0
- package/connectors/connect-grafana/README.md +193 -0
- package/connectors/connect-grafana/package.json +51 -0
- package/connectors/connect-grafana/scripts/release.ts +179 -0
- package/connectors/connect-grafana/src/api/client.ts +213 -0
- package/connectors/connect-grafana/src/api/example.ts +48 -0
- package/connectors/connect-grafana/src/api/index.ts +51 -0
- package/connectors/connect-grafana/src/cli/index.ts +254 -0
- package/connectors/connect-grafana/src/index.ts +103 -0
- package/connectors/connect-grafana/src/types/index.ts +237 -0
- package/connectors/connect-grafana/src/utils/auth.ts +274 -0
- package/connectors/connect-grafana/src/utils/bulk.ts +212 -0
- package/connectors/connect-grafana/src/utils/config.ts +326 -0
- package/connectors/connect-grafana/src/utils/output.ts +175 -0
- package/connectors/connect-grafana/src/utils/settings.ts +114 -0
- package/connectors/connect-grafana/src/utils/storage.ts +198 -0
- package/connectors/connect-grafana/tsconfig.json +16 -0
- package/connectors/connect-paddle/.env.example +11 -0
- package/connectors/connect-paddle/CLAUDE.md +272 -0
- package/connectors/connect-paddle/README.md +193 -0
- package/connectors/connect-paddle/package.json +51 -0
- package/connectors/connect-paddle/scripts/release.ts +179 -0
- package/connectors/connect-paddle/src/api/client.ts +213 -0
- package/connectors/connect-paddle/src/api/example.ts +48 -0
- package/connectors/connect-paddle/src/api/index.ts +51 -0
- package/connectors/connect-paddle/src/cli/index.ts +254 -0
- package/connectors/connect-paddle/src/index.ts +103 -0
- package/connectors/connect-paddle/src/types/index.ts +237 -0
- package/connectors/connect-paddle/src/utils/auth.ts +274 -0
- package/connectors/connect-paddle/src/utils/bulk.ts +212 -0
- package/connectors/connect-paddle/src/utils/config.ts +326 -0
- package/connectors/connect-paddle/src/utils/output.ts +175 -0
- package/connectors/connect-paddle/src/utils/settings.ts +114 -0
- package/connectors/connect-paddle/src/utils/storage.ts +198 -0
- package/connectors/connect-paddle/tsconfig.json +16 -0
- package/connectors/connect-snowflake/.env.example +11 -0
- package/connectors/connect-snowflake/CLAUDE.md +272 -0
- package/connectors/connect-snowflake/README.md +193 -0
- package/connectors/connect-snowflake/package.json +51 -0
- package/connectors/connect-snowflake/scripts/release.ts +179 -0
- package/connectors/connect-snowflake/src/api/client.ts +213 -0
- package/connectors/connect-snowflake/src/api/example.ts +48 -0
- package/connectors/connect-snowflake/src/api/index.ts +51 -0
- package/connectors/connect-snowflake/src/cli/index.ts +254 -0
- package/connectors/connect-snowflake/src/index.ts +103 -0
- package/connectors/connect-snowflake/src/types/index.ts +237 -0
- package/connectors/connect-snowflake/src/utils/auth.ts +274 -0
- package/connectors/connect-snowflake/src/utils/bulk.ts +212 -0
- package/connectors/connect-snowflake/src/utils/config.ts +326 -0
- package/connectors/connect-snowflake/src/utils/output.ts +175 -0
- package/connectors/connect-snowflake/src/utils/settings.ts +114 -0
- package/connectors/connect-snowflake/src/utils/storage.ts +198 -0
- package/connectors/connect-snowflake/tsconfig.json +16 -0
- package/connectors/connect-square/.env.example +11 -0
- package/connectors/connect-square/CLAUDE.md +128 -0
- package/connectors/connect-square/README.md +193 -0
- package/connectors/connect-square/package.json +52 -0
- package/connectors/connect-square/src/api/client.ts +152 -0
- package/connectors/connect-square/src/api/index.ts +343 -0
- package/connectors/connect-square/src/cli/index.ts +579 -0
- package/connectors/connect-square/src/index.ts +21 -0
- package/connectors/connect-square/src/types/index.ts +809 -0
- package/connectors/connect-square/src/utils/config.ts +209 -0
- package/connectors/connect-square/src/utils/output.ts +119 -0
- package/connectors/connect-square/tsconfig.json +16 -0
- package/dist/index.js +56 -0
- package/package.json +1 -1
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync } from 'fs';
|
|
2
|
+
import { homedir } from 'os';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
|
|
5
|
+
// Square connector configuration
|
|
6
|
+
const CONNECTOR_NAME = 'connect-square';
|
|
7
|
+
const DEFAULT_PROFILE = 'default';
|
|
8
|
+
|
|
9
|
+
export interface ProfileConfig {
|
|
10
|
+
accessToken?: string;
|
|
11
|
+
baseUrl?: string; // sandbox or production
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Store for --profile flag override (set by CLI before commands run)
|
|
15
|
+
let profileOverride: string | undefined;
|
|
16
|
+
|
|
17
|
+
// Config directory: ~/.connect/{connector-name}/
|
|
18
|
+
const CONFIG_DIR = join(homedir(), '.connect', CONNECTOR_NAME);
|
|
19
|
+
const PROFILES_DIR = join(CONFIG_DIR, 'profiles');
|
|
20
|
+
const CURRENT_PROFILE_FILE = join(CONFIG_DIR, 'current_profile');
|
|
21
|
+
|
|
22
|
+
// ============================================
|
|
23
|
+
// Profile Management
|
|
24
|
+
// ============================================
|
|
25
|
+
|
|
26
|
+
export function setProfileOverride(profile: string | undefined): void {
|
|
27
|
+
profileOverride = profile;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function ensureConfigDir(): void {
|
|
31
|
+
if (!existsSync(CONFIG_DIR)) {
|
|
32
|
+
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
33
|
+
}
|
|
34
|
+
if (!existsSync(PROFILES_DIR)) {
|
|
35
|
+
mkdirSync(PROFILES_DIR, { recursive: true });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getProfilePath(profile: string): string {
|
|
40
|
+
return join(PROFILES_DIR, `${profile}.json`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get the current active profile name
|
|
45
|
+
*/
|
|
46
|
+
export function getCurrentProfile(): string {
|
|
47
|
+
if (profileOverride) {
|
|
48
|
+
return profileOverride;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ensureConfigDir();
|
|
52
|
+
|
|
53
|
+
if (existsSync(CURRENT_PROFILE_FILE)) {
|
|
54
|
+
try {
|
|
55
|
+
const profile = readFileSync(CURRENT_PROFILE_FILE, 'utf-8').trim();
|
|
56
|
+
if (profile && profileExists(profile)) {
|
|
57
|
+
return profile;
|
|
58
|
+
}
|
|
59
|
+
} catch {
|
|
60
|
+
// Fall through to default
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return DEFAULT_PROFILE;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Set the current active profile
|
|
69
|
+
*/
|
|
70
|
+
export function setCurrentProfile(profile: string): void {
|
|
71
|
+
ensureConfigDir();
|
|
72
|
+
|
|
73
|
+
if (!profileExists(profile) && profile !== DEFAULT_PROFILE) {
|
|
74
|
+
throw new Error(`Profile "${profile}" does not exist`);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
writeFileSync(CURRENT_PROFILE_FILE, profile);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Check if a profile exists
|
|
82
|
+
*/
|
|
83
|
+
export function profileExists(profile: string): boolean {
|
|
84
|
+
return existsSync(getProfilePath(profile));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* List all available profiles
|
|
89
|
+
*/
|
|
90
|
+
export function listProfiles(): string[] {
|
|
91
|
+
ensureConfigDir();
|
|
92
|
+
|
|
93
|
+
if (!existsSync(PROFILES_DIR)) {
|
|
94
|
+
return [];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return readdirSync(PROFILES_DIR)
|
|
98
|
+
.filter(f => f.endsWith('.json'))
|
|
99
|
+
.map(f => f.replace('.json', ''))
|
|
100
|
+
.sort();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Create a new profile
|
|
105
|
+
*/
|
|
106
|
+
export function createProfile(profile: string, config: ProfileConfig = {}): boolean {
|
|
107
|
+
ensureConfigDir();
|
|
108
|
+
|
|
109
|
+
if (profileExists(profile)) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Validate profile name
|
|
114
|
+
if (!/^[a-zA-Z0-9_-]+$/.test(profile)) {
|
|
115
|
+
throw new Error('Profile name can only contain letters, numbers, hyphens, and underscores');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
writeFileSync(getProfilePath(profile), JSON.stringify(config, null, 2));
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Delete a profile
|
|
124
|
+
*/
|
|
125
|
+
export function deleteProfile(profile: string): boolean {
|
|
126
|
+
if (profile === DEFAULT_PROFILE) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (!profileExists(profile)) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Switch to default if deleting current profile
|
|
135
|
+
if (getCurrentProfile() === profile) {
|
|
136
|
+
setCurrentProfile(DEFAULT_PROFILE);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
rmSync(getProfilePath(profile));
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Load profile config
|
|
145
|
+
*/
|
|
146
|
+
export function loadProfile(profile?: string): ProfileConfig {
|
|
147
|
+
ensureConfigDir();
|
|
148
|
+
const profileName = profile || getCurrentProfile();
|
|
149
|
+
const profilePath = getProfilePath(profileName);
|
|
150
|
+
|
|
151
|
+
if (!existsSync(profilePath)) {
|
|
152
|
+
return {};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
try {
|
|
156
|
+
return JSON.parse(readFileSync(profilePath, 'utf-8'));
|
|
157
|
+
} catch {
|
|
158
|
+
return {};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Save profile config
|
|
164
|
+
*/
|
|
165
|
+
export function saveProfile(config: ProfileConfig, profile?: string): void {
|
|
166
|
+
ensureConfigDir();
|
|
167
|
+
const profileName = profile || getCurrentProfile();
|
|
168
|
+
writeFileSync(getProfilePath(profileName), JSON.stringify(config, null, 2));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ============================================
|
|
172
|
+
// Access Token Management
|
|
173
|
+
// ============================================
|
|
174
|
+
|
|
175
|
+
export function getAccessToken(): string | undefined {
|
|
176
|
+
return process.env.SQUARE_ACCESS_TOKEN || loadProfile().accessToken;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function setAccessToken(accessToken: string): void {
|
|
180
|
+
const config = loadProfile();
|
|
181
|
+
config.accessToken = accessToken;
|
|
182
|
+
saveProfile(config);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function getBaseUrl(): string | undefined {
|
|
186
|
+
return process.env.SQUARE_BASE_URL || loadProfile().baseUrl;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function setBaseUrl(baseUrl: string): void {
|
|
190
|
+
const config = loadProfile();
|
|
191
|
+
config.baseUrl = baseUrl;
|
|
192
|
+
saveProfile(config);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// ============================================
|
|
196
|
+
// Utility Functions
|
|
197
|
+
// ============================================
|
|
198
|
+
|
|
199
|
+
export function clearConfig(): void {
|
|
200
|
+
saveProfile({});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export function getConfigDir(): string {
|
|
204
|
+
return CONFIG_DIR;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export function getActiveProfileName(): string {
|
|
208
|
+
return getCurrentProfile();
|
|
209
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
export type OutputFormat = 'json' | 'table' | 'pretty';
|
|
4
|
+
|
|
5
|
+
export function formatOutput(data: unknown, format: OutputFormat = 'pretty'): string {
|
|
6
|
+
switch (format) {
|
|
7
|
+
case 'json':
|
|
8
|
+
return JSON.stringify(data, null, 2);
|
|
9
|
+
case 'table':
|
|
10
|
+
return formatAsTable(data);
|
|
11
|
+
case 'pretty':
|
|
12
|
+
default:
|
|
13
|
+
return formatPretty(data);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function formatAsTable(data: unknown): string {
|
|
18
|
+
if (!Array.isArray(data)) {
|
|
19
|
+
data = [data];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const items = data as Record<string, unknown>[];
|
|
23
|
+
if (items.length === 0) {
|
|
24
|
+
return 'No data';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const firstItem = items[0];
|
|
28
|
+
if (!firstItem || typeof firstItem !== 'object') {
|
|
29
|
+
return 'No data';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const keys = Object.keys(firstItem);
|
|
33
|
+
const colWidths = keys.map(key => {
|
|
34
|
+
const maxValue = Math.max(
|
|
35
|
+
key.length,
|
|
36
|
+
...items.map(item => String(item[key] ?? '').length)
|
|
37
|
+
);
|
|
38
|
+
return Math.min(maxValue, 40);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const header = keys.map((key, i) => key.padEnd(colWidths[i] ?? 10)).join(' | ');
|
|
42
|
+
const separator = colWidths.map(w => '-'.repeat(w)).join('-+-');
|
|
43
|
+
|
|
44
|
+
const rows = items.map(item =>
|
|
45
|
+
keys.map((key, i) => {
|
|
46
|
+
const value = String(item[key] ?? '');
|
|
47
|
+
const width = colWidths[i] ?? 10;
|
|
48
|
+
return value.length > width
|
|
49
|
+
? value.substring(0, width - 3) + '...'
|
|
50
|
+
: value.padEnd(width);
|
|
51
|
+
}).join(' | ')
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
return [header, separator, ...rows].join('\n');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function formatPretty(data: unknown): string {
|
|
58
|
+
if (Array.isArray(data)) {
|
|
59
|
+
return data.map((item, i) => `${chalk.cyan(`[${i + 1}]`)} ${formatPrettyItem(item)}`).join('\n\n');
|
|
60
|
+
}
|
|
61
|
+
return formatPrettyItem(data);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function formatPrettyItem(item: unknown, indent = 0): string {
|
|
65
|
+
if (item === null || item === undefined) {
|
|
66
|
+
return chalk.gray('null');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (typeof item !== 'object') {
|
|
70
|
+
return String(item);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const spaces = ' '.repeat(indent);
|
|
74
|
+
const entries = Object.entries(item as Record<string, unknown>);
|
|
75
|
+
|
|
76
|
+
return entries
|
|
77
|
+
.map(([key, value]) => {
|
|
78
|
+
if (Array.isArray(value)) {
|
|
79
|
+
if (value.length === 0) {
|
|
80
|
+
return `${spaces}${chalk.blue(key)}: ${chalk.gray('[]')}`;
|
|
81
|
+
}
|
|
82
|
+
if (typeof value[0] === 'object') {
|
|
83
|
+
return `${spaces}${chalk.blue(key)}:\n${value.map(v => formatPrettyItem(v, indent + 1)).join('\n')}`;
|
|
84
|
+
}
|
|
85
|
+
return `${spaces}${chalk.blue(key)}: ${value.join(', ')}`;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (typeof value === 'object' && value !== null) {
|
|
89
|
+
return `${spaces}${chalk.blue(key)}:\n${formatPrettyItem(value, indent + 1)}`;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return `${spaces}${chalk.blue(key)}: ${chalk.white(String(value))}`;
|
|
93
|
+
})
|
|
94
|
+
.join('\n');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function success(message: string): void {
|
|
98
|
+
console.log(chalk.green('✓'), message);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function error(message: string): void {
|
|
102
|
+
console.error(chalk.red('✗'), message);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function warn(message: string): void {
|
|
106
|
+
console.warn(chalk.yellow('⚠'), message);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function info(message: string): void {
|
|
110
|
+
console.log(chalk.blue('ℹ'), message);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function heading(message: string): void {
|
|
114
|
+
console.log(chalk.bold.cyan(`\n${message}\n`));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function print(data: unknown, format: OutputFormat = 'pretty'): void {
|
|
118
|
+
console.log(formatOutput(data, format));
|
|
119
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"rootDir": "./src",
|
|
12
|
+
"types": ["bun-types"]
|
|
13
|
+
},
|
|
14
|
+
"include": ["src/**/*"],
|
|
15
|
+
"exclude": ["node_modules", "dist", "bin"]
|
|
16
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -900,6 +900,62 @@ var CONNECTORS = [
|
|
|
900
900
|
description: "Visual collaboration and whiteboarding",
|
|
901
901
|
category: "Business Tools",
|
|
902
902
|
tags: ["whiteboard", "collaboration", "design"]
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
name: "square",
|
|
906
|
+
displayName: "Square",
|
|
907
|
+
description: "Payments, POS, and commerce",
|
|
908
|
+
category: "Commerce & Finance",
|
|
909
|
+
tags: ["payments", "pos", "commerce"]
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
name: "paddle",
|
|
913
|
+
displayName: "Paddle",
|
|
914
|
+
description: "SaaS billing and payments",
|
|
915
|
+
category: "Commerce & Finance",
|
|
916
|
+
tags: ["payments", "billing", "saas"]
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
name: "chargebee",
|
|
920
|
+
displayName: "Chargebee",
|
|
921
|
+
description: "Subscription billing and revenue management",
|
|
922
|
+
category: "Commerce & Finance",
|
|
923
|
+
tags: ["billing", "subscriptions"]
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
name: "fathom",
|
|
927
|
+
displayName: "Fathom Analytics",
|
|
928
|
+
description: "Privacy-first website analytics",
|
|
929
|
+
category: "Data & Analytics",
|
|
930
|
+
tags: ["analytics", "privacy"]
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
name: "snowflake",
|
|
934
|
+
displayName: "Snowflake",
|
|
935
|
+
description: "Cloud data warehouse",
|
|
936
|
+
category: "Data & Analytics",
|
|
937
|
+
tags: ["data", "warehouse", "sql"]
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
name: "databricks",
|
|
941
|
+
displayName: "Databricks",
|
|
942
|
+
description: "Data lakehouse and ML platform",
|
|
943
|
+
category: "Data & Analytics",
|
|
944
|
+
tags: ["data", "ml", "lakehouse"]
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
name: "datadog",
|
|
948
|
+
displayName: "Datadog",
|
|
949
|
+
description: "Monitoring and observability",
|
|
950
|
+
category: "Developer Tools",
|
|
951
|
+
tags: ["monitoring", "observability", "apm"]
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
name: "grafana",
|
|
955
|
+
displayName: "Grafana",
|
|
956
|
+
description: "Dashboards and observability",
|
|
957
|
+
category: "Developer Tools",
|
|
958
|
+
tags: ["monitoring", "dashboards", "observability"]
|
|
903
959
|
}
|
|
904
960
|
];
|
|
905
961
|
function getConnectorsByCategory(category) {
|