nango 0.40.1 → 0.40.3
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/cli.d.ts +3 -3
- package/dist/cli.js +49 -93
- package/dist/cli.js.map +1 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +0 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +15 -10
- package/dist/index.js.map +1 -1
- package/dist/services/compile.service.d.ts +5 -6
- package/dist/services/compile.service.js +40 -51
- package/dist/services/compile.service.js.map +1 -1
- package/dist/services/compile.service.unit.test.js +3 -3
- package/dist/services/compile.service.unit.test.js.map +1 -1
- package/dist/services/config.service.d.ts +16 -7
- package/dist/services/config.service.js +84 -54
- package/dist/services/config.service.js.map +1 -1
- package/dist/services/config.service.unit.test.d.ts +1 -0
- package/dist/services/config.service.unit.test.js +147 -0
- package/dist/services/config.service.unit.test.js.map +1 -0
- package/dist/services/deploy.service.d.ts +3 -3
- package/dist/services/deploy.service.js +76 -66
- package/dist/services/deploy.service.js.map +1 -1
- package/dist/services/dryrun.service.js +10 -10
- package/dist/services/dryrun.service.js.map +1 -1
- package/dist/services/migration.service.js +23 -26
- package/dist/services/migration.service.js.map +1 -1
- package/dist/services/model.service.d.ts +38 -11
- package/dist/services/model.service.js +129 -174
- package/dist/services/model.service.js.map +1 -1
- package/dist/services/model.service.unit.test.d.ts +1 -0
- package/dist/services/model.service.unit.test.js +138 -0
- package/dist/services/model.service.unit.test.js.map +1 -0
- package/dist/services/parser.service.d.ts +1 -2
- package/dist/services/parser.service.js +3 -4
- package/dist/services/parser.service.js.map +1 -1
- package/dist/services/verification.service.d.ts +1 -1
- package/dist/services/verification.service.js +11 -11
- package/dist/services/verification.service.js.map +1 -1
- package/dist/sync.unit.cli-test.js +65 -143
- package/dist/sync.unit.cli-test.js.map +1 -1
- package/dist/templates/action.ejs +2 -47
- package/dist/templates/sync.ejs +1 -4
- package/dist/utils/layoutMode.d.ts +7 -0
- package/dist/utils/layoutMode.js +41 -0
- package/dist/utils/layoutMode.js.map +1 -0
- package/dist/utils.d.ts +0 -3
- package/dist/utils.js +4 -127
- package/dist/utils.js.map +1 -1
- package/lib/nango.yaml.schema.v2.json +183 -178
- package/package.json +7 -6
- package/dist/nango-sync.d.ts +0 -299
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"type": "object",
|
|
4
|
+
"additionalProperties": false,
|
|
4
5
|
"properties": {
|
|
5
6
|
"integrations": {
|
|
6
7
|
"type": "object",
|
|
7
8
|
"additionalProperties": {
|
|
8
9
|
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
9
11
|
"properties": {
|
|
10
12
|
"post-connection-scripts": {
|
|
11
13
|
"type": "array",
|
|
@@ -13,215 +15,218 @@
|
|
|
13
15
|
"type": "string"
|
|
14
16
|
},
|
|
15
17
|
"errorMessage": {
|
|
16
|
-
"_": "
|
|
18
|
+
"_": "post-connection-scripts must be an array of strings."
|
|
17
19
|
}
|
|
18
20
|
},
|
|
19
21
|
"syncs": {
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"anyOf": [
|
|
24
|
-
{
|
|
22
|
+
"type": "object",
|
|
23
|
+
"patternProperties": {
|
|
24
|
+
"[a-zA-Z0-9-]+": {
|
|
25
25
|
"type": "object",
|
|
26
26
|
"additionalProperties": false,
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"type": "
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
"runs": {
|
|
68
|
-
"type": "string",
|
|
69
|
-
"errorMessage": {
|
|
70
|
-
"type": "nango yaml schema validation error: runs must be a string and include the word \"every\"."
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"endpoint": {
|
|
74
|
-
"oneOf": [
|
|
75
|
-
{ "type": "string" },
|
|
76
|
-
{
|
|
77
|
-
"type": "array",
|
|
78
|
-
"items": { "type": "string" }
|
|
27
|
+
"properties": {
|
|
28
|
+
"description": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"errorMessage": {
|
|
31
|
+
"type": "description must be a string."
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"sync_type": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["incremental", "full"],
|
|
37
|
+
"errorMessage": {
|
|
38
|
+
"enum": "sync_type must be either 'incremental' or 'full'."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"track_deletes": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"errorMessage": {
|
|
44
|
+
"type": "track_deletes must be a boolean."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"auto_start": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"errorMessage": {
|
|
50
|
+
"type": "auto_start must be a boolean."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"runs": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"errorMessage": {
|
|
56
|
+
"type": "runs must be a string and include the word \"every\"."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"endpoint": {
|
|
60
|
+
"oneOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^(GET\\s)?/[a-zA-Z0-9-./_]+$",
|
|
64
|
+
"errorMessage": {
|
|
65
|
+
"_": " "
|
|
79
66
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"type": "array",
|
|
90
|
-
"items": { "type": "string" }
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"pattern": "^(GET\\s)?/[a-zA-Z0-9-./_]+$",
|
|
73
|
+
"errorMessage": {
|
|
74
|
+
"_": " "
|
|
75
|
+
}
|
|
91
76
|
}
|
|
92
|
-
],
|
|
93
|
-
"errorMessage": {
|
|
94
|
-
"_": "nango yaml schema validation error: scopes must be a string or an array of strings."
|
|
95
77
|
}
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
78
|
+
],
|
|
79
|
+
"errorMessage": {
|
|
80
|
+
"_": "endpoint must be a URL (or an array of URLs) with an HTTP verb, i.e: \"GET /tickets/ticket\""
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"scopes": {
|
|
84
|
+
"oneOf": [
|
|
85
|
+
{
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "string"
|
|
110
92
|
}
|
|
111
|
-
],
|
|
112
|
-
"errorMessage": {
|
|
113
|
-
"_": "nango yaml schema validation error: output must be a string or an array of strings."
|
|
114
93
|
}
|
|
115
|
-
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
94
|
+
],
|
|
95
|
+
"errorMessage": {
|
|
96
|
+
"_": "scopes must be a string or an array of strings."
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"input": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"nullable": true,
|
|
102
|
+
"errorMessage": {
|
|
103
|
+
"type": "input must be a string and should define any required metadata for the sync."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"output": {
|
|
107
|
+
"oneOf": [
|
|
108
|
+
{
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "string"
|
|
122
115
|
}
|
|
123
|
-
],
|
|
124
|
-
"errorMessage": {
|
|
125
|
-
"_": "nango yaml schema validation error: webhook-subscriptions must be a string or an array of strings."
|
|
126
116
|
}
|
|
117
|
+
],
|
|
118
|
+
"errorMessage": {
|
|
119
|
+
"_": "output must be a string or an array of strings."
|
|
127
120
|
}
|
|
128
121
|
},
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
122
|
+
"webhook-subscriptions": {
|
|
123
|
+
"oneOf": [
|
|
124
|
+
{
|
|
125
|
+
"type": "string"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"errorMessage": {
|
|
135
|
+
"_": "webhook-subscriptions must be a string or an array of strings."
|
|
134
136
|
}
|
|
135
137
|
}
|
|
138
|
+
},
|
|
139
|
+
"required": ["endpoint", "output", "runs"],
|
|
140
|
+
"errorMessage": {
|
|
141
|
+
"required": {
|
|
142
|
+
"endpoint": "An endpoint property is required to specify how to retrieve the data from the sync.",
|
|
143
|
+
"output": "An output property is required to specify what is the outcome of the sync."
|
|
144
|
+
}
|
|
136
145
|
}
|
|
137
146
|
}
|
|
138
|
-
|
|
147
|
+
}
|
|
139
148
|
},
|
|
140
149
|
"actions": {
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
"anyOf": [
|
|
145
|
-
{
|
|
146
|
-
"type": "null",
|
|
147
|
-
"errorMessage": {
|
|
148
|
-
"_": " "
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
{
|
|
150
|
+
"type": "object",
|
|
151
|
+
"patternProperties": {
|
|
152
|
+
"[a-zA-Z0-9-]+": {
|
|
152
153
|
"type": "object",
|
|
153
154
|
"additionalProperties": false,
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
"type": "
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
{
|
|
179
|
-
"type": "array",
|
|
180
|
-
"items": { "type": "string" }
|
|
181
|
-
}
|
|
182
|
-
],
|
|
183
|
-
"errorMessage": {
|
|
184
|
-
"_": "nango yaml schema validation error: scopes must be a string or an array of strings."
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
"input": {
|
|
188
|
-
"type": "string",
|
|
189
|
-
"nullable": true,
|
|
190
|
-
"errorMessage": {
|
|
191
|
-
"type": "nango yaml schema validation error: input must be a string and should define any required metadata for the sync."
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
"output": {
|
|
195
|
-
"oneOf": [
|
|
196
|
-
{ "type": "string" },
|
|
197
|
-
{
|
|
198
|
-
"type": "array",
|
|
199
|
-
"items": { "type": "string" }
|
|
155
|
+
"properties": {
|
|
156
|
+
"description": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"errorMessage": {
|
|
159
|
+
"type": "description must be a string."
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"endpoint": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"pattern": "^((GET|POST|PUT|PATCH|DELETE)\\s)?/[a-zA-Z0-9-:{}./_]+$",
|
|
165
|
+
"errorMessage": {
|
|
166
|
+
"type": "endpoint must be a URI with an HTTP verb, i.e: \"POST /tickets/ticket\"",
|
|
167
|
+
"pattern": "endpoint must be a URI with an HTTP verb, i.e: \"POST /tickets/ticket\""
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"scopes": {
|
|
171
|
+
"oneOf": [
|
|
172
|
+
{
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "string"
|
|
200
179
|
}
|
|
201
|
-
],
|
|
202
|
-
"errorMessage": {
|
|
203
|
-
"_": "nango yaml schema validation error: output must be a string or an array of strings."
|
|
204
180
|
}
|
|
181
|
+
],
|
|
182
|
+
"errorMessage": {
|
|
183
|
+
"_": "scopes must be a string or an array of strings."
|
|
205
184
|
}
|
|
206
185
|
},
|
|
207
|
-
"
|
|
208
|
-
|
|
209
|
-
"
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
186
|
+
"input": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"nullable": true,
|
|
189
|
+
"errorMessage": {
|
|
190
|
+
"type": "input must be a string and should define any required input for the action."
|
|
191
|
+
}
|
|
213
192
|
},
|
|
214
|
-
"
|
|
215
|
-
"
|
|
193
|
+
"output": {
|
|
194
|
+
"oneOf": [
|
|
195
|
+
{
|
|
196
|
+
"type": "string"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"type": "array",
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"errorMessage": {
|
|
206
|
+
"_": "output must be a string or an array of strings."
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": ["endpoint"],
|
|
211
|
+
"errorMessage": {
|
|
212
|
+
"required": {
|
|
213
|
+
"endpoint": "An endpoint property is required to specify how to trigger the action."
|
|
216
214
|
}
|
|
217
215
|
}
|
|
218
216
|
}
|
|
219
|
-
|
|
217
|
+
}
|
|
220
218
|
}
|
|
221
|
-
}
|
|
222
|
-
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"models": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"patternProperties": {
|
|
225
|
+
"[a-zA-Z0-9_-]": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"additionalProperties": true
|
|
228
|
+
}
|
|
223
229
|
}
|
|
224
230
|
}
|
|
225
|
-
}
|
|
226
|
-
"additionalProperties": true
|
|
231
|
+
}
|
|
227
232
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nango",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.3",
|
|
4
4
|
"description": "Nango's CLI tool.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,16 +17,15 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "SEE LICENSE IN LICENSE FILE IN GIT REPOSITORY",
|
|
19
19
|
"scripts": {
|
|
20
|
-
"postbuild": "npm run copy:types",
|
|
21
20
|
"copy:files": "copyfiles -u 1 lib/templates/* dist",
|
|
22
|
-
"
|
|
23
|
-
"prepublishOnly": "npm run copy:files && npm run copy:types"
|
|
21
|
+
"prepublishOnly": "npm run copy:files"
|
|
24
22
|
},
|
|
25
23
|
"dependencies": {
|
|
26
24
|
"@babel/parser": "^7.22.5",
|
|
27
25
|
"@babel/traverse": "^7.22.5",
|
|
28
26
|
"@babel/types": "^7.22.5",
|
|
29
|
-
"@nangohq/
|
|
27
|
+
"@nangohq/nango-yaml": "^0.40.3",
|
|
28
|
+
"@nangohq/shared": "^0.40.3",
|
|
30
29
|
"@swc/core": "^1.5.25",
|
|
31
30
|
"ajv": "^8.12.0",
|
|
32
31
|
"ajv-errors": "^3.0.0",
|
|
@@ -41,6 +40,7 @@
|
|
|
41
40
|
"ejs": "^3.1.10",
|
|
42
41
|
"figlet": "^1.6.0",
|
|
43
42
|
"glob": "^10.3.10",
|
|
43
|
+
"import-meta-resolve": "^4.1.0",
|
|
44
44
|
"js-yaml": "^4.1.0",
|
|
45
45
|
"memfs": "^3.5.1",
|
|
46
46
|
"npm-package-arg": "^10.1.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@babel/core": "^7.22.1",
|
|
57
57
|
"@babel/preset-env": "^7.22.4",
|
|
58
58
|
"@babel/preset-typescript": "^7.21.5",
|
|
59
|
-
"@nangohq/types": "^0.40.
|
|
59
|
+
"@nangohq/types": "^0.40.3",
|
|
60
60
|
"@types/babel__traverse": "^7.20.1",
|
|
61
61
|
"@types/babel-traverse": "^6.25.7",
|
|
62
62
|
"@types/commander": "^2.12.2",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"@types/promptly": "^3.0.2",
|
|
69
69
|
"babel-loader": "^9.1.2",
|
|
70
70
|
"esbuild": "^0.17.19",
|
|
71
|
+
"strip-ansi": "7.1.0",
|
|
71
72
|
"vitest": "^0.33.0",
|
|
72
73
|
"webpack": "^5.85.1",
|
|
73
74
|
"webpack-cli": "^5.1.3",
|