nango 0.16.0
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/index.d.ts +2 -0
- package/dist/index.js +234 -0
- package/dist/index.js.map +1 -0
- package/package.json +31 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022 Nango, all rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
import { Command } from 'commander';
|
|
6
|
+
import axios from 'axios';
|
|
7
|
+
import https from 'https';
|
|
8
|
+
const program = new Command();
|
|
9
|
+
let hostport = process.env['NANGO_HOSTPORT'] || 'http://localhost:3003';
|
|
10
|
+
let cloudHost = 'https://api.nango.dev';
|
|
11
|
+
let stagingHost = 'https://nango-cloud-staging.onrender.com';
|
|
12
|
+
if (hostport.slice(-1) === '/') {
|
|
13
|
+
hostport = hostport.slice(0, -1);
|
|
14
|
+
}
|
|
15
|
+
// Test from the package root (/packages/cli) with 'node dist/index.js'
|
|
16
|
+
program
|
|
17
|
+
.name('nango')
|
|
18
|
+
.description(`A CLI tool to configure Nango:\n- By defaults, the CLI assumes that you are running Nango on localhost:3003\n- For Nango Cloud: Set the NANGO_HOSTPORT & NANGO_SECRET_KEY env variables\n- For Self-Hosting: set the NANGO_HOSTPORT env variable`);
|
|
19
|
+
program
|
|
20
|
+
.command('config:list')
|
|
21
|
+
.description('List all provider configurations.')
|
|
22
|
+
.action(async function () {
|
|
23
|
+
checkEnvVars();
|
|
24
|
+
let url = hostport + '/config';
|
|
25
|
+
await axios
|
|
26
|
+
.get(url, { headers: enrichHeaders(), httpsAgent: httpsAgent() })
|
|
27
|
+
.then((res) => {
|
|
28
|
+
console.table(res.data['configs'].map((o) => {
|
|
29
|
+
return { unique_key: o.unique_key, provider: o.provider, created: o.created_at };
|
|
30
|
+
}));
|
|
31
|
+
})
|
|
32
|
+
.catch((err) => {
|
|
33
|
+
console.log(`❌ ${err.response?.data.error || JSON.stringify(err)}`);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
program
|
|
37
|
+
.command('config:get')
|
|
38
|
+
.description('Get an provider configuration.')
|
|
39
|
+
.argument('<provider_config_key>', 'The unique key of the provider configuration (chosen by you upon creating this provider configuration).')
|
|
40
|
+
.action(async function () {
|
|
41
|
+
checkEnvVars();
|
|
42
|
+
let url = hostport + `/config/${this.args[0]}`;
|
|
43
|
+
await axios
|
|
44
|
+
.get(url, { headers: enrichHeaders(), httpsAgent: httpsAgent() })
|
|
45
|
+
.then((res) => {
|
|
46
|
+
console.table(res.data['config']);
|
|
47
|
+
})
|
|
48
|
+
.catch((err) => {
|
|
49
|
+
console.log(`❌ ${err.response?.data.error || JSON.stringify(err)}`);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
program
|
|
53
|
+
.command('config:create')
|
|
54
|
+
.description('Create an provider configuration.')
|
|
55
|
+
.argument('<provider_config_key>', 'The unique key of the provider configuration (choose a friendly name, e.g. hubspot_staging).')
|
|
56
|
+
.argument('<provider>', 'The provider of the 3rd-party API, must match the template keys in https://nango.dev/oauth-providers (e.g. hubspot).')
|
|
57
|
+
.argument('<oauth_client_id>', 'The OAuth Client ID obtained from the API provider.')
|
|
58
|
+
.argument('<oauth_client_secret>', 'The OAuth Client Secret obtained from the API provider.')
|
|
59
|
+
.argument('<oauth_scopes>', 'The OAuth Scopes obtained from the API provider (comma-separated).')
|
|
60
|
+
.action(async function () {
|
|
61
|
+
checkEnvVars();
|
|
62
|
+
let body = {
|
|
63
|
+
provider_config_key: this.args[0],
|
|
64
|
+
provider: this.args[1],
|
|
65
|
+
oauth_client_id: this.args[2],
|
|
66
|
+
oauth_client_secret: this.args[3],
|
|
67
|
+
oauth_scopes: this.args[4]
|
|
68
|
+
};
|
|
69
|
+
let url = hostport + `/config`;
|
|
70
|
+
await axios
|
|
71
|
+
.post(url, body, { headers: enrichHeaders(), httpsAgent: httpsAgent() })
|
|
72
|
+
.then((_) => {
|
|
73
|
+
console.log('\n\n✅ Successfully created a new provider configuration!\n\n');
|
|
74
|
+
})
|
|
75
|
+
.catch((err) => {
|
|
76
|
+
console.log(`❌ ${err.response?.data.error || JSON.stringify(err)}`);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
program
|
|
80
|
+
.command('config:edit')
|
|
81
|
+
.description('Edit an provider configuration.')
|
|
82
|
+
.argument('<provider_config_key>', 'The unique key of the provider configuration (choose a friendly name, e.g. hubspot_staging).')
|
|
83
|
+
.argument('<provider>', 'The provider of the 3rd-party API, must match the template keys in https://nango.dev/oauth-providers (e.g. hubspot).')
|
|
84
|
+
.argument('<oauth_client_id>', 'The OAuth Client ID obtained from the API provider.')
|
|
85
|
+
.argument('<oauth_client_secret>', 'The OAuth Client Secret obtained from the API provider.')
|
|
86
|
+
.argument('<oauth_scopes>', 'The OAuth Scopes obtained from the API provider (comma-separated).')
|
|
87
|
+
.action(async function () {
|
|
88
|
+
checkEnvVars();
|
|
89
|
+
let body = {
|
|
90
|
+
provider_config_key: this.args[0],
|
|
91
|
+
provider: this.args[1],
|
|
92
|
+
oauth_client_id: this.args[2],
|
|
93
|
+
oauth_client_secret: this.args[3],
|
|
94
|
+
oauth_scopes: this.args[4]
|
|
95
|
+
};
|
|
96
|
+
let url = hostport + `/config`;
|
|
97
|
+
await axios
|
|
98
|
+
.put(url, body, { headers: enrichHeaders(), httpsAgent: httpsAgent() })
|
|
99
|
+
.then((_) => {
|
|
100
|
+
console.log('\n\n✅ Successfully edited an existing provider configuration!\n\n');
|
|
101
|
+
})
|
|
102
|
+
.catch((err) => {
|
|
103
|
+
console.log(`❌ ${err.response?.data.error || JSON.stringify(err)}`);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
program
|
|
107
|
+
.command('config:delete')
|
|
108
|
+
.description('Delete an provider configuration.')
|
|
109
|
+
.argument('<provider_config_key>', 'The unique key of the provider configuration (chosen by you upon creating this provider configuration).')
|
|
110
|
+
.action(async function () {
|
|
111
|
+
checkEnvVars();
|
|
112
|
+
let url = hostport + `/config/${this.args[0]}`;
|
|
113
|
+
await axios
|
|
114
|
+
.delete(url, { headers: enrichHeaders(), httpsAgent: httpsAgent() })
|
|
115
|
+
.then((_) => {
|
|
116
|
+
console.log('\n\n✅ Successfully deleted the provider configuration!\n\n');
|
|
117
|
+
})
|
|
118
|
+
.catch((err) => {
|
|
119
|
+
console.log(`❌ ${err.response?.data.error || JSON.stringify(err)}`);
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
program
|
|
123
|
+
.command('connection:get')
|
|
124
|
+
.description('Get a connection with credentials.')
|
|
125
|
+
.argument('<provider_config_key>', 'The unique key of the provider configuration (chosen by you upon creating this provider configuration).')
|
|
126
|
+
.argument('<connection_id>', 'The ID of the Connection.')
|
|
127
|
+
.action(async function () {
|
|
128
|
+
checkEnvVars();
|
|
129
|
+
let url = hostport + `/connection/${this.args[1]}`;
|
|
130
|
+
await axios
|
|
131
|
+
.get(url, { params: { provider_config_key: this.args[0] }, headers: enrichHeaders(), httpsAgent: httpsAgent() })
|
|
132
|
+
.then((res) => {
|
|
133
|
+
console.log(res.data);
|
|
134
|
+
})
|
|
135
|
+
.catch((err) => {
|
|
136
|
+
console.log(`❌ ${err.response?.data.error || JSON.stringify(err)}`);
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
program
|
|
140
|
+
.command('token:get')
|
|
141
|
+
.description('Get an access token.')
|
|
142
|
+
.argument('<provider_config_key>', 'The unique key of the provider configuration (chosen by you upon creating this provider configuration).')
|
|
143
|
+
.argument('<connection_id>', 'The ID of the Connection.')
|
|
144
|
+
.action(async function () {
|
|
145
|
+
checkEnvVars();
|
|
146
|
+
let url = hostport + `/connection/${this.args[1]}`;
|
|
147
|
+
await axios
|
|
148
|
+
.get(url, { params: { provider_config_key: this.args[0] }, headers: enrichHeaders(), httpsAgent: httpsAgent() })
|
|
149
|
+
.then((response) => {
|
|
150
|
+
switch (response.data.credentials.type) {
|
|
151
|
+
case 'OAUTH2':
|
|
152
|
+
console.table({ token: response.data.credentials.access_token });
|
|
153
|
+
break;
|
|
154
|
+
case 'OAUTH1':
|
|
155
|
+
console.table(`token:${response.data.credentials.oauth_token}\nsecret:${response.data.credentials.oauth_token_secret}`);
|
|
156
|
+
break;
|
|
157
|
+
default:
|
|
158
|
+
throw new Error(`Unrecognized OAuth type '${response.data.credentials.type}' in stored credentials.`);
|
|
159
|
+
}
|
|
160
|
+
})
|
|
161
|
+
.catch((err) => {
|
|
162
|
+
console.log(`❌ ${err.response?.data.error || JSON.stringify(err)}`);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
program
|
|
166
|
+
.command('connection:list')
|
|
167
|
+
.description('List connections without credentials.')
|
|
168
|
+
.action(async function () {
|
|
169
|
+
checkEnvVars();
|
|
170
|
+
let url = hostport + `/connection`;
|
|
171
|
+
await axios
|
|
172
|
+
.get(url, { headers: enrichHeaders(), httpsAgent: httpsAgent() })
|
|
173
|
+
.then((res) => {
|
|
174
|
+
console.table(res.data['connections']);
|
|
175
|
+
})
|
|
176
|
+
.catch((err) => {
|
|
177
|
+
console.log(`❌ ${err.response?.data.error || JSON.stringify(err)}`);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
program
|
|
181
|
+
.command('connection:delete')
|
|
182
|
+
.description('Delete a connection.')
|
|
183
|
+
.argument('<provider_config_key>', 'The unique key of the provider configuration (chosen by you upon creating this provider configuration).')
|
|
184
|
+
.argument('<connection_id>', 'The ID of the Connection.')
|
|
185
|
+
.action(async function () {
|
|
186
|
+
checkEnvVars();
|
|
187
|
+
let url = hostport + `/connection/${this.args[1]}`;
|
|
188
|
+
await axios
|
|
189
|
+
.delete(url, { params: { provider_config_key: this.args[0] }, headers: enrichHeaders(), httpsAgent: httpsAgent() })
|
|
190
|
+
.then((_) => {
|
|
191
|
+
console.log('\n\n✅ Successfully deleted the connection!\n\n');
|
|
192
|
+
})
|
|
193
|
+
.catch((err) => {
|
|
194
|
+
console.log(`❌ ${err.response?.data.error || JSON.stringify(err)}`);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
program.parseAsync(process.argv);
|
|
198
|
+
function enrichHeaders(headers = {}) {
|
|
199
|
+
if ((process.env['NANGO_HOSTPORT'] === cloudHost || process.env['NANGO_HOSTPORT'] === stagingHost) && process.env['NANGO_SECRET_KEY']) {
|
|
200
|
+
// For Nango Cloud (unified)
|
|
201
|
+
headers['Authorization'] = 'Bearer ' + process.env['NANGO_SECRET_KEY'];
|
|
202
|
+
}
|
|
203
|
+
else if (process.env['NANGO_SECRET_KEY']) {
|
|
204
|
+
// For Nango OSS
|
|
205
|
+
headers['Authorization'] = 'Basic ' + Buffer.from(process.env['NANGO_SECRET_KEY'] + ':').toString('base64');
|
|
206
|
+
}
|
|
207
|
+
headers['Accept-Encoding'] = 'application/json';
|
|
208
|
+
return headers;
|
|
209
|
+
}
|
|
210
|
+
function httpsAgent() {
|
|
211
|
+
return new https.Agent({
|
|
212
|
+
rejectUnauthorized: false
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
function checkEnvVars() {
|
|
216
|
+
if (hostport === 'http://localhost:3003') {
|
|
217
|
+
console.log(`Assuming you are running Nango on localhost:3003 because you did not set the NANGO_HOSTPORT env var.\n\n`);
|
|
218
|
+
}
|
|
219
|
+
else if (hostport === cloudHost || hostport === stagingHost) {
|
|
220
|
+
if (!process.env['NANGO_SECRET_KEY']) {
|
|
221
|
+
console.log(`Assuming you are using Nango Cloud but your are lacking the NANGO_SECRET_KEY env var.`);
|
|
222
|
+
}
|
|
223
|
+
else if (hostport === cloudHost) {
|
|
224
|
+
console.log(`Assuming you are using Nango Cloud (because you set the NANGO_HOSTPORT env var to https://api.nango.dev).`);
|
|
225
|
+
}
|
|
226
|
+
else if (hostport === stagingHost) {
|
|
227
|
+
console.log(`Assuming you are using Nango Cloud (because you set the NANGO_HOSTPORT env var to https://api.staging.nango.dev).`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
console.log(`Assuming you are self-hosting Nango (becauses you set the NANGO_HOSTPORT env var to ${hostport}).`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";AAEA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,IAAI,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,uBAAuB,CAAC;AACxE,IAAI,SAAS,GAAG,uBAAuB,CAAC;AACxC,IAAI,WAAW,GAAG,0CAA0C,CAAC;AAE7D,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;IAC5B,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACpC;AAED,uEAAuE;AACvE,OAAO;KACF,IAAI,CAAC,OAAO,CAAC;KACb,WAAW,CACR,kPAAkP,CACrP,CAAC;AAEN,OAAO;KACF,OAAO,CAAC,aAAa,CAAC;KACtB,WAAW,CAAC,mCAAmC,CAAC;KAChD,MAAM,CAAC,KAAK;IACT,YAAY,EAAE,CAAC;IACf,IAAI,GAAG,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC/B,MAAM,KAAK;SACN,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC;SAChE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;QACV,OAAO,CAAC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AAC,CAAC;KAC/G;IAED,OAAO,CAAC,iBAAiB,CAAC,GAAG,kBAAkB,CAAC;IAEhD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,SAAS,UAAU;IACf,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC;QACnB,kBAAkB,EAAE,KAAK;KAC5B,CAAC,CAAC;AACP,CAAC;AAED,SAAS,YAAY;IACjB,IAAI,QAAQ,KAAK,uBAAuB,EAAE;QACtC,OAAO,CAAC,GAAG,CAAC,0GAA0G,CAAC,CAAC;KAC3H;SAAM,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,WAAW,EAAE;QAC3D,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE;YAClC,OAAO,CAAC,GAAG,CAAC,uFAAuF,CAAC,CAAC;SACxG;aAAM,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,2GAA2G,CAAC,CAAC;SAC5H;aAAM,IAAI,QAAQ,KAAK,WAAW,EAAE;YACjC,OAAO,CAAC,GAAG,CAAC,mHAAmH,CAAC,CAAC;SACpI;KACJ;SAAM;QACH,OAAO,CAAC,GAAG,CAAC,uFAAuF,QAAQ,IAAI,CAAC,CAAC;KACpH;AACL,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nango",
|
|
3
|
+
"version": "0.16.0",
|
|
4
|
+
"description": "Nango's CLI tool.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": "./dist/index.js",
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"author": "bastien@nango.dev",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/NangoHQ/nango",
|
|
13
|
+
"directory": "packages/cli"
|
|
14
|
+
},
|
|
15
|
+
"license": "SEE LICENSE IN LICENSE FILE IN GIT REPOSITORY",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"axios": "^1.2.0",
|
|
18
|
+
"commander": "^9.4.0"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/commander": "^2.12.2"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=16.7"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/**/*",
|
|
28
|
+
"!**/*.json",
|
|
29
|
+
"README.md"
|
|
30
|
+
]
|
|
31
|
+
}
|