nango 0.39.14 → 0.39.16
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/nango-sync.d.ts +6 -5
- package/dist/services/local-integration.service.d.ts +2 -2
- package/dist/services/local-integration.service.js +1 -1
- package/dist/services/local-integration.service.js.map +1 -1
- package/dist/templates/action.ejs +1 -1
- package/docker/docker-compose.yaml +23 -1
- package/package.json +2 -2
package/dist/nango-sync.d.ts
CHANGED
|
@@ -141,10 +141,10 @@ export interface NangoProps {
|
|
|
141
141
|
host?: string;
|
|
142
142
|
secretKey: string;
|
|
143
143
|
accountId?: number;
|
|
144
|
-
connectionId
|
|
144
|
+
connectionId: string;
|
|
145
145
|
environmentId?: number;
|
|
146
146
|
activityLogId?: number;
|
|
147
|
-
providerConfigKey
|
|
147
|
+
providerConfigKey: string;
|
|
148
148
|
provider?: string;
|
|
149
149
|
lastSyncDate?: Date;
|
|
150
150
|
syncId?: string | undefined;
|
|
@@ -178,8 +178,8 @@ export declare class NangoAction {
|
|
|
178
178
|
syncJobId?: number;
|
|
179
179
|
dryRun?: boolean;
|
|
180
180
|
abortSignal?: AbortSignal;
|
|
181
|
-
connectionId
|
|
182
|
-
providerConfigKey
|
|
181
|
+
connectionId: string;
|
|
182
|
+
providerConfigKey: string;
|
|
183
183
|
provider?: string;
|
|
184
184
|
ActionError: typeof ActionError;
|
|
185
185
|
private memoizedConnections;
|
|
@@ -217,7 +217,8 @@ export declare class NangoAction {
|
|
|
217
217
|
getEnvironmentVariables(): Promise<EnvironmentVariable[] | null>;
|
|
218
218
|
getFlowAttributes<A = object>(): A | null;
|
|
219
219
|
paginate<T = any>(config: ProxyConfiguration): AsyncGenerator<T[], undefined, void>;
|
|
220
|
-
triggerAction(providerConfigKey: string, connectionId: string, actionName: string, input?: unknown): Promise<
|
|
220
|
+
triggerAction<T = object>(providerConfigKey: string, connectionId: string, actionName: string, input?: unknown): Promise<T>;
|
|
221
|
+
triggerSync(providerConfigKey: string, connectionId: string, syncName: string, fullResync?: boolean): Promise<void>;
|
|
221
222
|
}
|
|
222
223
|
export declare class NangoSync extends NangoAction {
|
|
223
224
|
lastSyncDate?: Date;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IntegrationServiceInterface,
|
|
1
|
+
import type { IntegrationServiceInterface, RunScriptOptions, RunnerOutput } from '@nangohq/shared';
|
|
2
2
|
declare class IntegrationService implements IntegrationServiceInterface {
|
|
3
3
|
cancelScript(): Promise<void>;
|
|
4
|
-
runScript(syncName
|
|
4
|
+
runScript({ syncName, nangoProps, isInvokedImmediately, isWebhook, optionalLoadLocation, input }: RunScriptOptions): Promise<RunnerOutput>;
|
|
5
5
|
}
|
|
6
6
|
declare const _default: IntegrationService;
|
|
7
7
|
export default _default;
|
|
@@ -8,7 +8,7 @@ class IntegrationService {
|
|
|
8
8
|
async cancelScript() {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
|
-
async runScript(syncName,
|
|
11
|
+
async runScript({ syncName, nangoProps, isInvokedImmediately, isWebhook, optionalLoadLocation, input }) {
|
|
12
12
|
try {
|
|
13
13
|
const nango = new NangoSync(nangoProps);
|
|
14
14
|
const script = localFileService.getIntegrationFile(syncName, optionalLoadLocation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-integration.service.js","sourceRoot":"","sources":["../../lib/services/local-integration.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC1G,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,kBAAkB;IACpB,KAAK,CAAC,YAAY;QACd,OAAO;IACX,CAAC;IAED,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"local-integration.service.js","sourceRoot":"","sources":["../../lib/services/local-integration.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC1G,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,kBAAkB;IACpB,KAAK,CAAC,YAAY;QACd,OAAO;IACX,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,SAAS,EAAE,oBAAoB,EAAE,KAAK,EAAoB;QACpH,IAAI,CAAC;YACD,MAAM,KAAK,GAAG,IAAI,SAAS,CAAC,UAAU,CAAC,CAAC;YACxC,MAAM,MAAM,GAAkB,gBAAgB,CAAC,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;YAElG,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,MAAM,OAAO,GAAG,uCAAuC,QAAQ,EAAE,CAAC;gBAElE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACnF,CAAC;YAED,IAAI,CAAC;gBACD,MAAM,aAAa,GAAG;;;;0BAIZ,MAAM;;;iBAGf,CAAC;gBAEF,MAAM,SAAS,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC/C,MAAM,OAAO,GAA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E;4BACH,IAAI,EAAE,GAAG,CAAC,IAAI;4BACd,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE;4BAC1B,MAAM,EAAE,GAAG;yBACd;wBACD,QAAQ,EAAE,IAAI;qBACjB,CAAC;gBACN,CAAC;gBAED,IAAI,SAAS,GAAG,qBAAqB,CAAC;gBACtC,IAAI,SAAS,EAAE,CAAC;oBACZ,SAAS,GAAG,wBAAwB,CAAC;gBACzC,CAAC;qBAAM,IAAI,oBAAoB,EAAE,CAAC;oBAC9B,SAAS,GAAG,uBAAuB,CAAC;gBACxC,CAAC;gBAED,OAAO,iBAAiB,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;YACvD,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;YAC1E,MAAM,OAAO,GAAG,iCAAiC,QAAQ,8BAA8B,YAAY,EAAE,CAAC;YAEtG,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACnF,CAAC;IACL,CAAC;CACJ;AAED,eAAe,IAAI,kBAAkB,EAAE,CAAC"}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
if (formattedInputs) {
|
|
38
38
|
const formattedInputsArray = formattedInputs.split(',').map(input => input.trim());
|
|
39
|
-
if (isArrayInterfaceNames) {
|
|
39
|
+
if (isArrayInterfaceNames && formattedInterfaceNames) {
|
|
40
40
|
formattedInterfaceNames = formattedInterfaceNames.filter(interfaceName => !formattedInputsArray.includes(interfaceName));
|
|
41
41
|
} else {
|
|
42
42
|
formattedInterfaceNames = formattedInterfaceNames === formattedInputs ? '' : formattedInterfaceNames;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
version: '3.9'
|
|
2
2
|
services:
|
|
3
3
|
nango-db:
|
|
4
|
-
image: postgres:
|
|
4
|
+
image: postgres:16.0-alpine
|
|
5
5
|
container_name: nango-db
|
|
6
6
|
environment:
|
|
7
7
|
POSTGRES_PASSWORD: nango
|
|
@@ -36,6 +36,7 @@ services:
|
|
|
36
36
|
- LOG_LEVEL=${LOG_LEVEL:-info}
|
|
37
37
|
- TELEMETRY=${TELEMETRY}
|
|
38
38
|
- NANGO_SERVER_WEBSOCKETS_PATH=${NANGO_SERVER_WEBSOCKETS_PATH}
|
|
39
|
+
- NANGO_LOGS_ES_URL=${NANGO_LOGS_ES_URL:-http://localhost:9500}
|
|
39
40
|
restart: always
|
|
40
41
|
ports:
|
|
41
42
|
- '${NANGO_PORT:-3003}:${NANGO_PORT:-3003}'
|
|
@@ -103,5 +104,26 @@ services:
|
|
|
103
104
|
networks:
|
|
104
105
|
- nango
|
|
105
106
|
|
|
107
|
+
nanog-es:
|
|
108
|
+
image: elasticsearch:8.12.2
|
|
109
|
+
ulimits:
|
|
110
|
+
memlock:
|
|
111
|
+
soft: -1
|
|
112
|
+
hard: -1
|
|
113
|
+
volumes:
|
|
114
|
+
- esdata1:/usr/share/elasticsearch/data
|
|
115
|
+
ports:
|
|
116
|
+
- 9500:9500
|
|
117
|
+
- 9600:9300
|
|
118
|
+
environment:
|
|
119
|
+
- discovery.type=single-node
|
|
120
|
+
- xpack.security.enabled=false
|
|
121
|
+
networks:
|
|
122
|
+
- nango
|
|
123
|
+
|
|
106
124
|
networks:
|
|
107
125
|
nango:
|
|
126
|
+
|
|
127
|
+
volumes:
|
|
128
|
+
esdata1:
|
|
129
|
+
driver: local
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nango",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.16",
|
|
4
4
|
"description": "Nango's CLI tool.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@babel/traverse": "^7.22.5",
|
|
28
28
|
"@babel/types": "^7.22.5",
|
|
29
29
|
"@inquirer/prompts": "^2.3.0",
|
|
30
|
-
"@nangohq/shared": "^0.39.
|
|
30
|
+
"@nangohq/shared": "^0.39.16",
|
|
31
31
|
"@vercel/ncc": "^0.36.1",
|
|
32
32
|
"ajv": "^8.12.0",
|
|
33
33
|
"ajv-errors": "^3.0.0",
|