nango 0.35.15 → 0.35.18
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/action.ejs +36 -2
- package/dist/sync.ejs +4 -1
- package/docker/docker-compose.yaml +2 -2
- package/package.json +2 -2
package/dist/action.ejs
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
<%
|
|
2
|
+
const isArrayInterfaceNames = Array.isArray(interfaceNames);
|
|
3
|
+
const isArrayMappings = Array.isArray(mappings);
|
|
4
|
+
const isArrayInputs = Array.isArray(inputs);
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
const formattedInterfaceNames = isArrayInterfaceNames ? interfaceNames.join(', ') : interfaceNames;
|
|
7
|
+
const javascriptPrimitives = ['string', 'number', 'boolean', 'bigint', 'symbol', 'undefined', 'object', 'null'];
|
|
8
|
+
const filteredInputs = isArrayInputs ? inputs.filter(input => !javascriptPrimitives.includes(input)) : inputs;
|
|
9
|
+
|
|
10
|
+
const formattedInputs = isArrayInputs ? filteredInputs.join(', ') : (javascriptPrimitives.includes(inputs) ? '' : inputs);
|
|
11
|
+
|
|
12
|
+
let returnTypes = 'void';
|
|
13
|
+
if (isArrayMappings && mappings.length > 0) {
|
|
14
|
+
if (mappings.length === 1) {
|
|
15
|
+
returnTypes = `${mappings[0].name}[]`;
|
|
16
|
+
} else {
|
|
17
|
+
returnTypes = '{' + mappings.map(mapping => `${mapping.name}: ${mapping.type}[]`).join(', ') + '}';
|
|
18
|
+
}
|
|
19
|
+
} else if (typeof mappings === 'object') {
|
|
20
|
+
returnTypes = `${mappings.name}`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let paramInputs = 'object';
|
|
24
|
+
let optionalInput = '?';
|
|
25
|
+
if (inputs) {
|
|
26
|
+
optionalInput = '';
|
|
27
|
+
|
|
28
|
+
if (isArrayInputs) {
|
|
29
|
+
paramInputs = `${inputs}[];`
|
|
30
|
+
} else {
|
|
31
|
+
paramInputs = inputs;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
%>
|
|
35
|
+
import type { NangoAction<%= formattedInterfaceNames ? ', ' + formattedInterfaceNames : '' %><%= formattedInputs ? ', ' + formattedInputs : '' %> } from './<%= interfaceFileName %>';
|
|
36
|
+
|
|
37
|
+
export default async function runAction(nango: NangoAction, input<%= optionalInput %>: <%= paramInputs %>): Promise<<%= returnTypes %>> {
|
|
4
38
|
// Integration code goes here
|
|
5
39
|
}
|
package/dist/sync.ejs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
<%
|
|
2
|
+
const formattedInterfaceNames = Array.isArray(interfaceNames) ? interfaceNames.join(', ') : interfaceNames;
|
|
3
|
+
%>
|
|
4
|
+
import type { NangoSync<%= formattedInterfaceNames ? ', ' + formattedInterfaceNames : '' %> } from './<%= interfaceFileName %>';
|
|
2
5
|
|
|
3
6
|
export default async function fetchData(nango: NangoSync): Promise<void> {
|
|
4
7
|
// Integration code goes here
|
|
@@ -15,7 +15,7 @@ services:
|
|
|
15
15
|
- nango
|
|
16
16
|
|
|
17
17
|
nango-server:
|
|
18
|
-
image: nangohq/nango-server:0.35.
|
|
18
|
+
image: nangohq/nango-server:0.35.18
|
|
19
19
|
container_name: nango-server
|
|
20
20
|
environment:
|
|
21
21
|
- TEMPORAL_ADDRESS=temporal:7233
|
|
@@ -47,7 +47,7 @@ services:
|
|
|
47
47
|
- nango
|
|
48
48
|
|
|
49
49
|
nango-worker:
|
|
50
|
-
image: nangohq/nango-worker:0.35.
|
|
50
|
+
image: nangohq/nango-worker:0.35.18
|
|
51
51
|
container_name: nango-worker
|
|
52
52
|
restart: always
|
|
53
53
|
ports:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nango",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.18",
|
|
4
4
|
"description": "Nango's CLI tool.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@babel/traverse": "^7.22.5",
|
|
25
25
|
"@inquirer/prompts": "^2.3.0",
|
|
26
|
-
"@nangohq/shared": "0.35.
|
|
26
|
+
"@nangohq/shared": "0.35.18",
|
|
27
27
|
"@vercel/ncc": "^0.36.1",
|
|
28
28
|
"axios": "^1.2.0",
|
|
29
29
|
"byots": "^5.0.0-dev.20221103.1.34",
|