nango 0.36.65 → 0.36.67
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
CHANGED
|
@@ -124,6 +124,11 @@ interface Connection {
|
|
|
124
124
|
credentials_tag?: string | null;
|
|
125
125
|
credentials: AuthCredentials;
|
|
126
126
|
}
|
|
127
|
+
export declare class ActionError extends Error {
|
|
128
|
+
type: string;
|
|
129
|
+
payload: unknown;
|
|
130
|
+
constructor(payload?: unknown);
|
|
131
|
+
}
|
|
127
132
|
export interface NangoProps {
|
|
128
133
|
host?: string;
|
|
129
134
|
secretKey: string;
|
|
@@ -160,6 +165,7 @@ export declare class NangoAction {
|
|
|
160
165
|
dryRun?: boolean;
|
|
161
166
|
connectionId?: string;
|
|
162
167
|
providerConfigKey?: string;
|
|
168
|
+
ActionError: typeof ActionError;
|
|
163
169
|
constructor(config: NangoProps);
|
|
164
170
|
proxy<T = any>(config: ProxyConfiguration): Promise<AxiosResponse<T>>;
|
|
165
171
|
get<T = any>(config: ProxyConfiguration): Promise<AxiosResponse<T>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NangoError, formatScriptError, NangoSync, localFileService } from '@nangohq/shared';
|
|
1
|
+
import { ActionError, NangoError, formatScriptError, NangoSync, localFileService } from '@nangohq/shared';
|
|
2
2
|
import * as vm from 'vm';
|
|
3
3
|
import * as url from 'url';
|
|
4
4
|
import * as crypto from 'crypto';
|
|
@@ -48,6 +48,10 @@ class IntegrationService {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
catch (err) {
|
|
51
|
+
// TODO merge this back with the main integration service
|
|
52
|
+
if (err instanceof ActionError) {
|
|
53
|
+
return { success: false, error: err, response: null };
|
|
54
|
+
}
|
|
51
55
|
let errorType = 'sync_script_failure';
|
|
52
56
|
if (isWebhook) {
|
|
53
57
|
errorType = 'webhook_script_failure';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-integration.service.js","sourceRoot":"","sources":["../../lib/services/local-integration.service.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"local-integration.service.js","sourceRoot":"","sources":["../../lib/services/local-integration.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,UAAU,EACV,iBAAiB,EAGjB,SAAS,EAET,gBAAgB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,kBAAkB;IACpB,KAAK,CAAC,SAAS,CACX,QAAgB,EAChB,OAAe,EACf,cAAkC,EAClC,UAAsB,EACtB,gBAAsC,EACtC,cAAsB,EACtB,UAAmB,EACnB,oBAA6B,EAC7B,SAAkB,EAClB,oBAA6B,EAC7B,KAAc;QAEd,IAAI;YACA,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;gBACT,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;aAClF;YAED,IAAI;gBACA,MAAM,aAAa,GAAG;;;;0BAIZ,MAAM;;;iBAGf,CAAC;gBAEF,MAAM,SAAS,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC/C,MAAM,OAAO,GAAG;oBACZ,OAAO;oBACP,OAAO,EAAE,CAAC,UAAkB,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qBAAM,IAAI,oBAAoB,EAAE;oBAC7B,SAAS,GAAG,uBAAuB,CAAC;iBACvC;gBAED,OAAO,iBAAiB,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;aACtD;SACJ;QAAC,OAAO,GAAG,EAAE;YACV,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;SAClF;IACL,CAAC;CACJ;AAED,eAAe,IAAI,kBAAkB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nango",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.67",
|
|
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.36.
|
|
26
|
+
"@nangohq/shared": "0.36.67",
|
|
27
27
|
"@vercel/ncc": "^0.36.1",
|
|
28
28
|
"ajv": "^8.12.0",
|
|
29
29
|
"ajv-errors": "^3.0.0",
|