dataverse-utils 2.0.12 → 2.1.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/CHANGELOG.json +266 -0
- package/CHANGELOG.md +126 -0
- package/lib/assemblyDeploy.js +5 -5
- package/lib/auth.js +2 -2
- package/lib/deploy.js +4 -4
- package/lib/generate.js +7 -7
- package/lib/{dataverse-utils.js → index.js} +3 -1
- package/lib/logger.js +26 -0
- package/lib/models/pluginAssembly.js +7 -7
- package/lib/models/pluginImage.js +3 -3
- package/lib/models/pluginStep.js +5 -5
- package/lib/models/pluginType.js +3 -3
- package/lib/models/webResource.js +9 -9
- package/lib/webResourceDeploy.js +5 -5
- package/package.json +3 -3
- package/lib/assemblyDeploy.d.ts +0 -3
- package/lib/auth.d.ts +0 -2
- package/lib/cachePlugin.d.ts +0 -2
- package/lib/dataverse-utils.d.ts +0 -2
- package/lib/dataverse.service.d.ts +0 -34
- package/lib/deploy.d.ts +0 -1
- package/lib/generate.d.ts +0 -1
- package/lib/models/pluginAssembly.d.ts +0 -13
- package/lib/models/pluginImage.d.ts +0 -10
- package/lib/models/pluginStep.d.ts +0 -20
- package/lib/models/pluginType.d.ts +0 -11
- package/lib/models/webResource.d.ts +0 -10
- package/lib/webResourceDeploy.d.ts +0 -3
package/CHANGELOG.json
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dataverse-utils",
|
|
3
|
+
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Sun, 16 Jan 2022 21:29:55 GMT",
|
|
6
|
+
"tag": "dataverse-utils_v2.1.0",
|
|
7
|
+
"version": "2.1.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
12
|
+
"package": "dataverse-utils",
|
|
13
|
+
"commit": "bb36663768d27bdffc3165129865f8bdce4ea3c0",
|
|
14
|
+
"comment": "Remove dependencies; Fix plop dependency"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Tue, 07 Dec 2021 20:03:45 GMT",
|
|
21
|
+
"tag": "dataverse-utils_v2.0.12",
|
|
22
|
+
"version": "2.0.12",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "beachball",
|
|
27
|
+
"package": "dataverse-utils",
|
|
28
|
+
"comment": "Bump dataverse-webapi to v2.0.3",
|
|
29
|
+
"commit": "6a5b71a6c0a60ca12b3866e521639c16f170da41"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Tue, 07 Dec 2021 19:52:53 GMT",
|
|
36
|
+
"tag": "dataverse-utils_v2.0.11",
|
|
37
|
+
"version": "2.0.11",
|
|
38
|
+
"comments": {
|
|
39
|
+
"patch": [
|
|
40
|
+
{
|
|
41
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
42
|
+
"package": "dataverse-utils",
|
|
43
|
+
"commit": "7ada3bfbcf286db81f5fba616560cc4f56dd9b2a",
|
|
44
|
+
"comment": "Switch to commonjs"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Tue, 07 Dec 2021 19:41:36 GMT",
|
|
51
|
+
"tag": "dataverse-utils_v2.0.10",
|
|
52
|
+
"version": "2.0.10",
|
|
53
|
+
"comments": {
|
|
54
|
+
"patch": [
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "dataverse-utils",
|
|
58
|
+
"comment": "Bump dataverse-webapi to v2.0.2",
|
|
59
|
+
"commit": "def26173ed0d1454365703f801c31a686f5bc380"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"date": "Tue, 07 Dec 2021 18:53:08 GMT",
|
|
66
|
+
"tag": "dataverse-utils_v2.0.9",
|
|
67
|
+
"version": "2.0.9",
|
|
68
|
+
"comments": {
|
|
69
|
+
"none": [
|
|
70
|
+
{
|
|
71
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
72
|
+
"package": "dataverse-utils",
|
|
73
|
+
"commit": "8f6412e011f27a8c7b9da6c7247f4f4c38919a0d",
|
|
74
|
+
"comment": "Add descriptions"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"date": "Tue, 07 Dec 2021 18:44:10 GMT",
|
|
81
|
+
"tag": "dataverse-utils_v2.0.9",
|
|
82
|
+
"version": "2.0.9",
|
|
83
|
+
"comments": {
|
|
84
|
+
"none": [
|
|
85
|
+
{
|
|
86
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
87
|
+
"package": "dataverse-utils",
|
|
88
|
+
"commit": "b679eab6b9aa175842736c5f451f6b42a718b23c",
|
|
89
|
+
"comment": "Add license"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"date": "Tue, 07 Dec 2021 16:11:56 GMT",
|
|
96
|
+
"tag": "dataverse-utils_v2.0.9",
|
|
97
|
+
"version": "2.0.9",
|
|
98
|
+
"comments": {
|
|
99
|
+
"patch": [
|
|
100
|
+
{
|
|
101
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
102
|
+
"package": "dataverse-utils",
|
|
103
|
+
"commit": "65e96cce1a649a1a10214d8dfd7331fdc2367366",
|
|
104
|
+
"comment": "Fix glob package"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"date": "Thu, 02 Dec 2021 20:50:52 GMT",
|
|
111
|
+
"tag": "dataverse-utils_v2.0.8",
|
|
112
|
+
"version": "2.0.8",
|
|
113
|
+
"comments": {
|
|
114
|
+
"patch": [
|
|
115
|
+
{
|
|
116
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
117
|
+
"package": "dataverse-utils",
|
|
118
|
+
"commit": "ca4c93ee6ee9ab4b9ea567120f0af5e162542998",
|
|
119
|
+
"comment": "Fix node-plop"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"date": "Sat, 13 Nov 2021 04:59:34 GMT",
|
|
126
|
+
"tag": "dataverse-utils_v2.0.7",
|
|
127
|
+
"version": "2.0.7",
|
|
128
|
+
"comments": {
|
|
129
|
+
"patch": [
|
|
130
|
+
{
|
|
131
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
132
|
+
"package": "dataverse-utils",
|
|
133
|
+
"commit": "615b4f15124a34b46a2508de44f1524f5e94678c",
|
|
134
|
+
"comment": "Fix error handling on creates"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"date": "Wed, 03 Nov 2021 15:06:58 GMT",
|
|
141
|
+
"tag": "dataverse-utils_v2.0.6",
|
|
142
|
+
"version": "2.0.6",
|
|
143
|
+
"comments": {
|
|
144
|
+
"patch": [
|
|
145
|
+
{
|
|
146
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
147
|
+
"package": "dataverse-utils",
|
|
148
|
+
"commit": "a190400c57bc04abc65cf28a87ba10707d37566c",
|
|
149
|
+
"comment": "Force update package version"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"date": "Wed, 03 Nov 2021 14:55:25 GMT",
|
|
156
|
+
"tag": "dataverse-utils_v2.0.5",
|
|
157
|
+
"version": "2.0.5",
|
|
158
|
+
"comments": {
|
|
159
|
+
"patch": [
|
|
160
|
+
{
|
|
161
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
162
|
+
"package": "dataverse-utils",
|
|
163
|
+
"commit": "3ebf5be6fd6e5bbb1fbfdb163d97f10c59a3db85",
|
|
164
|
+
"comment": "Add catch to create calls"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"date": "Tue, 02 Nov 2021 16:20:01 GMT",
|
|
171
|
+
"tag": "dataverse-utils_v2.0.4",
|
|
172
|
+
"version": "2.0.4",
|
|
173
|
+
"comments": {
|
|
174
|
+
"patch": [
|
|
175
|
+
{
|
|
176
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
177
|
+
"package": "dataverse-utils",
|
|
178
|
+
"commit": "f8cfe1e4a4d4becf82b91fcae9a1749365053ab3",
|
|
179
|
+
"comment": "Update error handling"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"author": "beachball",
|
|
183
|
+
"package": "dataverse-utils",
|
|
184
|
+
"comment": "Bump dataverse-webapi to v2.0.1",
|
|
185
|
+
"commit": "f8cfe1e4a4d4becf82b91fcae9a1749365053ab3"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"date": "Fri, 17 Sep 2021 05:34:12 GMT",
|
|
192
|
+
"tag": "dataverse-utils_v2.0.3",
|
|
193
|
+
"version": "2.0.3",
|
|
194
|
+
"comments": {
|
|
195
|
+
"patch": [
|
|
196
|
+
{
|
|
197
|
+
"comment": "Fix encryption",
|
|
198
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
199
|
+
"commit": "96923c83bf0e9b6e93c15fea5453b45494bb5611",
|
|
200
|
+
"package": "dataverse-utils"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"date": "Thu, 16 Sep 2021 21:30:04 GMT",
|
|
207
|
+
"tag": "dataverse-utils_v2.0.2",
|
|
208
|
+
"version": "2.0.2",
|
|
209
|
+
"comments": {
|
|
210
|
+
"patch": [
|
|
211
|
+
{
|
|
212
|
+
"comment": "Fix first time auth",
|
|
213
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
214
|
+
"commit": "d13f2f05e702a82bb127dbac7f9f33daf027ea64",
|
|
215
|
+
"package": "dataverse-utils"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"date": "Thu, 16 Sep 2021 20:57:31 GMT",
|
|
222
|
+
"tag": "dataverse-utils_v2.0.1",
|
|
223
|
+
"version": "2.0.1",
|
|
224
|
+
"comments": {
|
|
225
|
+
"patch": [
|
|
226
|
+
{
|
|
227
|
+
"comment": "Update wording for entering table",
|
|
228
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
229
|
+
"commit": "963c071a39980f4cef59a3ab24c1f749504d0584",
|
|
230
|
+
"package": "dataverse-utils"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"date": "Thu, 16 Sep 2021 20:49:48 GMT",
|
|
237
|
+
"tag": "dataverse-utils_v2.0.0",
|
|
238
|
+
"version": "2.0.0",
|
|
239
|
+
"comments": {
|
|
240
|
+
"major": [
|
|
241
|
+
{
|
|
242
|
+
"comment": "Switch to device-code auth",
|
|
243
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
244
|
+
"commit": "b1c526bdddb59fe2f4a3eb61096909ebbb2379d7",
|
|
245
|
+
"package": "dataverse-utils"
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"date": "Thu, 02 Sep 2021 16:22:00 GMT",
|
|
252
|
+
"tag": "dataverse-utils_v1.0.1",
|
|
253
|
+
"version": "1.0.1",
|
|
254
|
+
"comments": {
|
|
255
|
+
"patch": [
|
|
256
|
+
{
|
|
257
|
+
"comment": "Add generate command; Rename project",
|
|
258
|
+
"author": "derek.finlinson@journeyteam.com",
|
|
259
|
+
"commit": "d1c26f12e1e58b86cc3cfe26274f0dbd35d5ad70",
|
|
260
|
+
"package": "dataverse-utils"
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Change Log - dataverse-utils
|
|
2
|
+
|
|
3
|
+
This log was last generated on Sun, 16 Jan 2022 21:29:55 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
<!-- Start content -->
|
|
6
|
+
|
|
7
|
+
## 2.1.0
|
|
8
|
+
|
|
9
|
+
Sun, 16 Jan 2022 21:29:55 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Remove dependencies; Fix plop dependency (derek.finlinson@journeyteam.com)
|
|
14
|
+
|
|
15
|
+
## 2.0.12
|
|
16
|
+
|
|
17
|
+
Tue, 07 Dec 2021 20:03:45 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Bump dataverse-webapi to v2.0.3
|
|
22
|
+
|
|
23
|
+
## 2.0.11
|
|
24
|
+
|
|
25
|
+
Tue, 07 Dec 2021 19:52:53 GMT
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- Switch to commonjs (derek.finlinson@journeyteam.com)
|
|
30
|
+
|
|
31
|
+
## 2.0.10
|
|
32
|
+
|
|
33
|
+
Tue, 07 Dec 2021 19:41:36 GMT
|
|
34
|
+
|
|
35
|
+
### Patches
|
|
36
|
+
|
|
37
|
+
- Bump dataverse-webapi to v2.0.2
|
|
38
|
+
|
|
39
|
+
## 2.0.9
|
|
40
|
+
|
|
41
|
+
Tue, 07 Dec 2021 16:11:56 GMT
|
|
42
|
+
|
|
43
|
+
### Patches
|
|
44
|
+
|
|
45
|
+
- Fix glob package (derek.finlinson@journeyteam.com)
|
|
46
|
+
|
|
47
|
+
## 2.0.8
|
|
48
|
+
|
|
49
|
+
Thu, 02 Dec 2021 20:50:52 GMT
|
|
50
|
+
|
|
51
|
+
### Patches
|
|
52
|
+
|
|
53
|
+
- Fix node-plop (derek.finlinson@journeyteam.com)
|
|
54
|
+
|
|
55
|
+
## 2.0.7
|
|
56
|
+
|
|
57
|
+
Sat, 13 Nov 2021 04:59:34 GMT
|
|
58
|
+
|
|
59
|
+
### Patches
|
|
60
|
+
|
|
61
|
+
- Fix error handling on creates (derek.finlinson@journeyteam.com)
|
|
62
|
+
|
|
63
|
+
## 2.0.6
|
|
64
|
+
|
|
65
|
+
Wed, 03 Nov 2021 15:06:58 GMT
|
|
66
|
+
|
|
67
|
+
### Patches
|
|
68
|
+
|
|
69
|
+
- Force update package version (derek.finlinson@journeyteam.com)
|
|
70
|
+
|
|
71
|
+
## 2.0.5
|
|
72
|
+
|
|
73
|
+
Wed, 03 Nov 2021 14:55:25 GMT
|
|
74
|
+
|
|
75
|
+
### Patches
|
|
76
|
+
|
|
77
|
+
- Add catch to create calls (derek.finlinson@journeyteam.com)
|
|
78
|
+
|
|
79
|
+
## 2.0.4
|
|
80
|
+
|
|
81
|
+
Tue, 02 Nov 2021 16:20:01 GMT
|
|
82
|
+
|
|
83
|
+
### Patches
|
|
84
|
+
|
|
85
|
+
- Update error handling (derek.finlinson@journeyteam.com)
|
|
86
|
+
- Bump dataverse-webapi to v2.0.1
|
|
87
|
+
|
|
88
|
+
## 2.0.3
|
|
89
|
+
|
|
90
|
+
Fri, 17 Sep 2021 05:34:12 GMT
|
|
91
|
+
|
|
92
|
+
### Patches
|
|
93
|
+
|
|
94
|
+
- Fix encryption (derek.finlinson@journeyteam.com)
|
|
95
|
+
|
|
96
|
+
## 2.0.2
|
|
97
|
+
|
|
98
|
+
Thu, 16 Sep 2021 21:30:04 GMT
|
|
99
|
+
|
|
100
|
+
### Patches
|
|
101
|
+
|
|
102
|
+
- Fix first time auth (derek.finlinson@journeyteam.com)
|
|
103
|
+
|
|
104
|
+
## 2.0.1
|
|
105
|
+
|
|
106
|
+
Thu, 16 Sep 2021 20:57:31 GMT
|
|
107
|
+
|
|
108
|
+
### Patches
|
|
109
|
+
|
|
110
|
+
- Update wording for entering table (derek.finlinson@journeyteam.com)
|
|
111
|
+
|
|
112
|
+
## 2.0.0
|
|
113
|
+
|
|
114
|
+
Thu, 16 Sep 2021 20:49:48 GMT
|
|
115
|
+
|
|
116
|
+
### Major changes
|
|
117
|
+
|
|
118
|
+
- Switch to device-code auth (derek.finlinson@journeyteam.com)
|
|
119
|
+
|
|
120
|
+
## 1.0.1
|
|
121
|
+
|
|
122
|
+
Thu, 02 Sep 2021 16:22:00 GMT
|
|
123
|
+
|
|
124
|
+
### Patches
|
|
125
|
+
|
|
126
|
+
- Add generate command; Rename project (derek.finlinson@journeyteam.com)
|
package/lib/assemblyDeploy.js
CHANGED
|
@@ -7,23 +7,23 @@ exports.deployAssembly = void 0;
|
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const pluginAssembly_1 = require("./models/pluginAssembly");
|
|
10
|
-
const
|
|
10
|
+
const logger_1 = require("./logger");
|
|
11
11
|
async function deployAssembly(creds, apiConfig) {
|
|
12
12
|
const currentPath = '.';
|
|
13
13
|
const configFile = fs_1.default.readFileSync(path_1.default.resolve(currentPath, 'dataverse.config.json'), 'utf8');
|
|
14
14
|
if (configFile == null) {
|
|
15
|
-
|
|
15
|
+
logger_1.logger.warn('unable to find dataverse.config.json file');
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
const config = JSON.parse(configFile);
|
|
19
|
-
|
|
19
|
+
logger_1.logger.info('deploy assembly');
|
|
20
20
|
try {
|
|
21
21
|
await (0, pluginAssembly_1.deploy)(config, apiConfig, creds.solution);
|
|
22
22
|
}
|
|
23
23
|
catch (error) {
|
|
24
|
-
|
|
24
|
+
logger_1.logger.error(error.message);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
logger_1.logger.info(`deployed assembly ${config.name}\r\n`);
|
|
28
28
|
}
|
|
29
29
|
exports.deployAssembly = deployAssembly;
|
package/lib/auth.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getAccessToken = void 0;
|
|
4
4
|
const cachePlugin_1 = require("./cachePlugin");
|
|
5
5
|
const msal_node_1 = require("@azure/msal-node");
|
|
6
|
-
const
|
|
6
|
+
const logger_1 = require("./logger");
|
|
7
7
|
const clientId = '51f81489-12ee-4a9e-aaae-a2591f45987d';
|
|
8
8
|
const getAccessToken = async (tenant, url) => {
|
|
9
9
|
const config = {
|
|
@@ -35,7 +35,7 @@ const getAccessToken = async (tenant, url) => {
|
|
|
35
35
|
// Acquire token by device code
|
|
36
36
|
const token = await pca.acquireTokenByDeviceCode({
|
|
37
37
|
scopes: [`${url}/.default`],
|
|
38
|
-
deviceCodeCallback: (response) =>
|
|
38
|
+
deviceCodeCallback: (response) => logger_1.logger.info(response.message)
|
|
39
39
|
}).catch(ex => {
|
|
40
40
|
throw new Error(ex.message);
|
|
41
41
|
});
|
package/lib/deploy.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const prompts_1 = __importDefault(require("prompts"));
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const
|
|
9
|
+
const logger_1 = require("./logger");
|
|
10
10
|
const assemblyDeploy_1 = require("./assemblyDeploy");
|
|
11
11
|
const webResourceDeploy_1 = require("./webResourceDeploy");
|
|
12
12
|
const node_1 = require("dataverse-webapi/lib/node");
|
|
@@ -29,7 +29,7 @@ async function deploy(type, files) {
|
|
|
29
29
|
const currentPath = '.';
|
|
30
30
|
const credsFile = fs_1.default.readFileSync(path_1.default.resolve(currentPath, 'dataverse.config.json'), 'utf8');
|
|
31
31
|
if (credsFile == null) {
|
|
32
|
-
|
|
32
|
+
logger_1.logger.warn('unable to find dataverse.config.json file');
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
const creds = JSON.parse(credsFile).connection;
|
|
@@ -38,11 +38,11 @@ async function deploy(type, files) {
|
|
|
38
38
|
token = await (0, auth_1.getAccessToken)(creds.tenant, creds.server);
|
|
39
39
|
}
|
|
40
40
|
catch (error) {
|
|
41
|
-
|
|
41
|
+
logger_1.logger.error(`failed to acquire access token: ${error.message}`);
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
if (token == null || token.accessToken == null) {
|
|
45
|
-
|
|
45
|
+
logger_1.logger.error('failed to acquire access token');
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
const apiConfig = new node_1.WebApiConfig('8.2', token.accessToken, creds.server);
|
package/lib/generate.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const prompts_1 = __importDefault(require("prompts"));
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const
|
|
9
|
+
const logger_1 = require("./logger");
|
|
10
10
|
const dataverse_service_1 = require("./dataverse.service");
|
|
11
11
|
const node_1 = require("dataverse-webapi/lib/node");
|
|
12
12
|
const auth_1 = require("./auth");
|
|
@@ -22,7 +22,7 @@ async function generate(table) {
|
|
|
22
22
|
const currentPath = '.';
|
|
23
23
|
const credsFile = fs_1.default.readFileSync(path_1.default.resolve(currentPath, 'dataverse.config.json'), 'utf8');
|
|
24
24
|
if (credsFile == null) {
|
|
25
|
-
|
|
25
|
+
logger_1.logger.warn('unable to find dataverse.config.json file');
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
const creds = JSON.parse(credsFile).connection;
|
|
@@ -31,21 +31,21 @@ async function generate(table) {
|
|
|
31
31
|
token = await (0, auth_1.getAccessToken)(creds.tenant, creds.server);
|
|
32
32
|
}
|
|
33
33
|
catch (error) {
|
|
34
|
-
|
|
34
|
+
logger_1.logger.error(`failed to acquire access token: ${error.message}`);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
if (token == null || token.accessToken == null) {
|
|
38
|
-
|
|
38
|
+
logger_1.logger.error('failed to acquire access token');
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
41
|
const apiConfig = new node_1.WebApiConfig('8.2', token.accessToken, creds.server);
|
|
42
42
|
let metadata = {};
|
|
43
|
-
|
|
43
|
+
logger_1.logger.info('Retrieve table metadata');
|
|
44
44
|
try {
|
|
45
45
|
metadata = await (0, dataverse_service_1.getTableMetadata)(table, apiConfig);
|
|
46
46
|
}
|
|
47
47
|
catch (error) {
|
|
48
|
-
|
|
48
|
+
logger_1.logger.error(error.message);
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
// Build code file from metadata
|
|
@@ -94,6 +94,6 @@ async function generate(table) {
|
|
|
94
94
|
fs_1.default.mkdirSync(path_1.default.resolve(currentPath, 'src', 'scripts', 'models'));
|
|
95
95
|
}
|
|
96
96
|
fs_1.default.writeFileSync(path_1.default.resolve(currentPath, 'src', 'scripts', 'models', `${metadata.schemaName}.ts`), codeFile);
|
|
97
|
-
|
|
97
|
+
logger_1.logger.info(`Table metadata output to models/${metadata.schemaName}.ts`);
|
|
98
98
|
}
|
|
99
99
|
exports.default = generate;
|
|
@@ -7,9 +7,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const commander_1 = require("commander");
|
|
8
8
|
const deploy_1 = __importDefault(require("./deploy"));
|
|
9
9
|
const generate_1 = __importDefault(require("./generate"));
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
11
|
+
const packageJson = require('../package.json');
|
|
10
12
|
commander_1.program
|
|
11
13
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
12
|
-
.version(
|
|
14
|
+
.version(packageJson.version)
|
|
13
15
|
.usage('<command> [options]');
|
|
14
16
|
// Deploy command
|
|
15
17
|
commander_1.program
|
package/lib/logger.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.logger = void 0;
|
|
7
|
+
const kleur_1 = __importDefault(require("kleur"));
|
|
8
|
+
const square = '\u25a0';
|
|
9
|
+
const triangle = '\u25b2';
|
|
10
|
+
const emptySquare = '\u25a1';
|
|
11
|
+
const log = (method, symbol, ...args) => {
|
|
12
|
+
const now = new Date();
|
|
13
|
+
const timestamp = kleur_1.default.gray(`[${now.toLocaleTimeString()}]`);
|
|
14
|
+
console[method](timestamp, symbol, args);
|
|
15
|
+
};
|
|
16
|
+
exports.logger = {
|
|
17
|
+
info(...args) {
|
|
18
|
+
log('info', kleur_1.default.green(square), args);
|
|
19
|
+
},
|
|
20
|
+
warn(...args) {
|
|
21
|
+
log('warn', kleur_1.default.yellow(triangle), args);
|
|
22
|
+
},
|
|
23
|
+
error(...args) {
|
|
24
|
+
log('error', kleur_1.default.red(emptySquare), args);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
@@ -9,11 +9,11 @@ const glob_1 = __importDefault(require("glob"));
|
|
|
9
9
|
const node_1 = require("dataverse-webapi/lib/node");
|
|
10
10
|
const pluginType_1 = require("./pluginType");
|
|
11
11
|
const dataverse_service_1 = require("../dataverse.service");
|
|
12
|
-
const
|
|
12
|
+
const logger_1 = require("../logger");
|
|
13
13
|
async function deploy(config, apiConfig, solution) {
|
|
14
14
|
const files = glob_1.default.sync(`**/${config.name}.dll`);
|
|
15
15
|
if (files.length === 0) {
|
|
16
|
-
|
|
16
|
+
logger_1.logger.error(`assembly ${config.name}.dll not found`);
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
const content = fs_1.default.readFileSync(files[0]).toString('base64');
|
|
@@ -22,7 +22,7 @@ async function deploy(config, apiConfig, solution) {
|
|
|
22
22
|
assemblyId = await retrieveAssembly(config.name, apiConfig);
|
|
23
23
|
}
|
|
24
24
|
catch (error) {
|
|
25
|
-
|
|
25
|
+
logger_1.logger.error(`failed to retrieve assembly ${config.name}: ${error.message}`);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
if (assemblyId != '') {
|
|
@@ -45,7 +45,7 @@ async function deploy(config, apiConfig, solution) {
|
|
|
45
45
|
await (0, dataverse_service_1.addToSolution)(assemblyId, solution, dataverse_service_1.ComponentType.PluginAssembly, apiConfig);
|
|
46
46
|
}
|
|
47
47
|
catch (error) {
|
|
48
|
-
|
|
48
|
+
logger_1.logger.error(`failed to add to solution: ${error.message}`);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -58,7 +58,7 @@ async function deploy(config, apiConfig, solution) {
|
|
|
58
58
|
await Promise.all(promises);
|
|
59
59
|
}
|
|
60
60
|
catch (error) {
|
|
61
|
-
|
|
61
|
+
logger_1.logger.error(error.message);
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -70,7 +70,7 @@ async function retrieveAssembly(name, apiConfig) {
|
|
|
70
70
|
return result.value.length > 0 ? result.value[0].pluginassemblyid : '';
|
|
71
71
|
}
|
|
72
72
|
async function createAssembly(config, content, apiConfig) {
|
|
73
|
-
|
|
73
|
+
logger_1.logger.info(`create assembly ${config.name}`);
|
|
74
74
|
const assembly = {
|
|
75
75
|
name: config.name,
|
|
76
76
|
content: content,
|
|
@@ -87,7 +87,7 @@ async function createAssembly(config, content, apiConfig) {
|
|
|
87
87
|
return result.pluginassemblyid;
|
|
88
88
|
}
|
|
89
89
|
async function updateAssembly(id, config, content, apiConfig) {
|
|
90
|
-
|
|
90
|
+
logger_1.logger.info(`update assembly ${config.name}`);
|
|
91
91
|
const assembly = {
|
|
92
92
|
content: content,
|
|
93
93
|
version: config.version
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deployImage = void 0;
|
|
4
|
-
const
|
|
4
|
+
const logger_1 = require("../logger");
|
|
5
5
|
const node_1 = require("dataverse-webapi/lib/node");
|
|
6
6
|
async function deployImage(stepId, image, message, apiConfig) {
|
|
7
7
|
image['sdkmessageprocessingstepid@odata.bind'] = `/sdkmessageprocessingsteps(${stepId})`;
|
|
@@ -48,7 +48,7 @@ async function retrieveImage(stepId, image, apiConfig) {
|
|
|
48
48
|
return result.value.length > 0 ? result.value[0].sdkmessageprocessingstepimageid : '';
|
|
49
49
|
}
|
|
50
50
|
async function createImage(image, apiConfig) {
|
|
51
|
-
|
|
51
|
+
logger_1.logger.info(`create plugin image ${image.name}`);
|
|
52
52
|
const result = await (0, node_1.createWithReturnData)(apiConfig, 'sdkmessageprocessingstepimages', image, '$select=sdkmessageprocessingstepimageid');
|
|
53
53
|
if (result.error) {
|
|
54
54
|
throw new Error(result.error.message);
|
|
@@ -56,6 +56,6 @@ async function createImage(image, apiConfig) {
|
|
|
56
56
|
return result.sdkmessageprocessingstepimageid;
|
|
57
57
|
}
|
|
58
58
|
async function updateImage(id, image, apiConfig) {
|
|
59
|
-
|
|
59
|
+
logger_1.logger.info(`update plugin image ${image.name}`);
|
|
60
60
|
return (0, node_1.update)(apiConfig, 'sdkmessageprocessingstepimages', id, image);
|
|
61
61
|
}
|
package/lib/models/pluginStep.js
CHANGED
|
@@ -3,18 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deployStep = void 0;
|
|
4
4
|
const node_1 = require("dataverse-webapi/lib/node");
|
|
5
5
|
const dataverse_service_1 = require("../dataverse.service");
|
|
6
|
-
const
|
|
6
|
+
const logger_1 = require("../logger");
|
|
7
7
|
const pluginImage_1 = require("./pluginImage");
|
|
8
8
|
async function deployStep(step, apiConfig, solution) {
|
|
9
9
|
let stepId = await retrieveStep(step.name, apiConfig);
|
|
10
10
|
const messageId = await getSdkMessageId(step.message ?? '', apiConfig);
|
|
11
11
|
if (messageId == '') {
|
|
12
|
-
|
|
12
|
+
logger_1.logger.error(`sdk message ${step.message} not found`);
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
const filterId = await getSdkMessageFilterId(messageId, step.entity ?? '', apiConfig);
|
|
16
16
|
if (filterId == '') {
|
|
17
|
-
|
|
17
|
+
logger_1.logger.error(`sdk message ${step.message} for entity ${step.entity} not found`);
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
step['sdkmessagefilterid@odata.bind'] = `/sdkmessagefilters(${filterId})`;
|
|
@@ -85,7 +85,7 @@ async function getSdkMessageId(name, apiConfig) {
|
|
|
85
85
|
return message.value.length > 0 ? message.value[0].sdkmessageid : '';
|
|
86
86
|
}
|
|
87
87
|
async function createStep(step, apiConfig) {
|
|
88
|
-
|
|
88
|
+
logger_1.logger.info(`create plugin step ${step.name}`);
|
|
89
89
|
const result = await (0, node_1.createWithReturnData)(apiConfig, 'sdkmessageprocessingsteps', step, '$select=sdkmessageprocessingstepid');
|
|
90
90
|
if (result.error) {
|
|
91
91
|
throw new Error(result.error.message);
|
|
@@ -93,6 +93,6 @@ async function createStep(step, apiConfig) {
|
|
|
93
93
|
return result.sdkmessageprocessingstepid;
|
|
94
94
|
}
|
|
95
95
|
async function updateStep(id, step, apiConfig) {
|
|
96
|
-
|
|
96
|
+
logger_1.logger.info(`update plugin step ${step.name}`);
|
|
97
97
|
return (0, node_1.update)(apiConfig, 'sdkmessageprocessingsteps', id, step);
|
|
98
98
|
}
|
package/lib/models/pluginType.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deployType = void 0;
|
|
4
4
|
const node_1 = require("dataverse-webapi/lib/node");
|
|
5
5
|
const pluginStep_1 = require("./pluginStep");
|
|
6
|
-
const
|
|
6
|
+
const logger_1 = require("../logger");
|
|
7
7
|
async function deployType(type, apiConfig, solution) {
|
|
8
8
|
let typeId = await retrieveType(type.typename, apiConfig);
|
|
9
9
|
const record = {
|
|
@@ -50,7 +50,7 @@ async function retrieveType(name, apiConfig) {
|
|
|
50
50
|
return result.value.length > 0 ? result.value[0].plugintypeid : '';
|
|
51
51
|
}
|
|
52
52
|
async function createType(type, apiConfig) {
|
|
53
|
-
|
|
53
|
+
logger_1.logger.info(`create assembly type ${type.name}`);
|
|
54
54
|
const result = await (0, node_1.createWithReturnData)(apiConfig, 'plugintypes', type, '$select=plugintypeid');
|
|
55
55
|
if (result.error) {
|
|
56
56
|
throw new Error(result.error.message);
|
|
@@ -58,6 +58,6 @@ async function createType(type, apiConfig) {
|
|
|
58
58
|
return result.plugintypeid;
|
|
59
59
|
}
|
|
60
60
|
async function updateType(id, type, apiConfig) {
|
|
61
|
-
|
|
61
|
+
logger_1.logger.info(`update assembly type ${type.name}`);
|
|
62
62
|
return (0, node_1.update)(apiConfig, 'plugintypes', id, type);
|
|
63
63
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.deploy = void 0;
|
|
7
7
|
const dataverse_service_1 = require("../dataverse.service");
|
|
8
8
|
const node_1 = require("dataverse-webapi/lib/node");
|
|
9
|
-
const
|
|
9
|
+
const logger_1 = require("../logger");
|
|
10
10
|
const fs_1 = __importDefault(require("fs"));
|
|
11
11
|
function getWebResourceType(type) {
|
|
12
12
|
switch (type) {
|
|
@@ -47,7 +47,7 @@ async function deploy(webResources, apiConfig, solution, files) {
|
|
|
47
47
|
for (const file of files.split(',')) {
|
|
48
48
|
const resource = webResources.filter(r => r.path?.endsWith(file));
|
|
49
49
|
if (resource.length === 0) {
|
|
50
|
-
|
|
50
|
+
logger_1.logger.error(`web resource ${file} not found in dataverse.config.json`);
|
|
51
51
|
continue;
|
|
52
52
|
}
|
|
53
53
|
resources.push(resource[0]);
|
|
@@ -59,7 +59,7 @@ async function deploy(webResources, apiConfig, solution, files) {
|
|
|
59
59
|
resourceId = await retrieveResource(resource.name, apiConfig);
|
|
60
60
|
}
|
|
61
61
|
catch (error) {
|
|
62
|
-
|
|
62
|
+
logger_1.logger.error(`failed to retrieve resource ${resource.name}: ${error.message}`);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
const fileContent = fs_1.default.readFileSync(resource.path, 'utf8');
|
|
@@ -70,7 +70,7 @@ async function deploy(webResources, apiConfig, solution, files) {
|
|
|
70
70
|
publishXml.push(updated);
|
|
71
71
|
}
|
|
72
72
|
catch (error) {
|
|
73
|
-
|
|
73
|
+
logger_1.logger.error(`failed to update resource: ${error.message}`);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
@@ -78,14 +78,14 @@ async function deploy(webResources, apiConfig, solution, files) {
|
|
|
78
78
|
resourceId = await createResource(resource, content, apiConfig);
|
|
79
79
|
}
|
|
80
80
|
catch (error) {
|
|
81
|
-
|
|
81
|
+
logger_1.logger.error(`failed to create resource: ${error.message}`);
|
|
82
82
|
}
|
|
83
83
|
if (solution != undefined) {
|
|
84
84
|
try {
|
|
85
85
|
await (0, dataverse_service_1.addToSolution)(resourceId, solution, dataverse_service_1.ComponentType.WebResource, apiConfig);
|
|
86
86
|
}
|
|
87
87
|
catch (error) {
|
|
88
|
-
|
|
88
|
+
logger_1.logger.error(`failed to add to solution: ${error.message}`);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -97,7 +97,7 @@ async function deploy(webResources, apiConfig, solution, files) {
|
|
|
97
97
|
await (0, dataverse_service_1.publish)(publishXml.join(''), apiConfig);
|
|
98
98
|
}
|
|
99
99
|
catch (error) {
|
|
100
|
-
|
|
100
|
+
logger_1.logger.error(error.message);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -108,7 +108,7 @@ async function retrieveResource(name, apiConfig) {
|
|
|
108
108
|
return result.value.length > 0 ? result.value[0].webresourceid : '';
|
|
109
109
|
}
|
|
110
110
|
async function createResource(resource, content, apiConfig) {
|
|
111
|
-
|
|
111
|
+
logger_1.logger.info(`create web resource ${resource.name}`);
|
|
112
112
|
const webResource = {
|
|
113
113
|
webresourcetype: getWebResourceType(resource.type),
|
|
114
114
|
name: resource.name,
|
|
@@ -122,7 +122,7 @@ async function createResource(resource, content, apiConfig) {
|
|
|
122
122
|
return result.webresourceid;
|
|
123
123
|
}
|
|
124
124
|
async function updateResource(id, resource, content, apiConfig) {
|
|
125
|
-
|
|
125
|
+
logger_1.logger.info(`update web resource ${resource.name}`);
|
|
126
126
|
const webResource = {
|
|
127
127
|
content: content
|
|
128
128
|
};
|
package/lib/webResourceDeploy.js
CHANGED
|
@@ -6,24 +6,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.deployWebResource = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
|
-
const
|
|
9
|
+
const logger_1 = require("./logger");
|
|
10
10
|
const webResource_1 = require("./models/webResource");
|
|
11
11
|
async function deployWebResource(creds, apiConfig, files) {
|
|
12
12
|
const currentPath = '.';
|
|
13
13
|
const configFile = fs_1.default.readFileSync(path_1.default.resolve(currentPath, 'dataverse.config.json'), 'utf8');
|
|
14
14
|
if (configFile == null) {
|
|
15
|
-
|
|
15
|
+
logger_1.logger.warn('unable to find dataverse.config.json file');
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
const config = JSON.parse(configFile).webResources;
|
|
19
|
-
|
|
19
|
+
logger_1.logger.info('deploy web resources');
|
|
20
20
|
try {
|
|
21
21
|
await (0, webResource_1.deploy)(config, apiConfig, creds.solution, files);
|
|
22
22
|
}
|
|
23
23
|
catch (error) {
|
|
24
|
-
|
|
24
|
+
logger_1.logger.error(error.message);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
logger_1.logger.info('deployed web resources');
|
|
28
28
|
}
|
|
29
29
|
exports.deployWebResource = deployWebResource;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dataverse-utils",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Utilities for interacting with Dataverse environments",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"dataverse-utils": "lib/
|
|
8
|
+
"dataverse-utils": "lib/index.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"/lib"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"cryptr": "^6.0.2",
|
|
27
27
|
"dataverse-webapi": "^2.0.3",
|
|
28
28
|
"envinfo": "^7.8.1",
|
|
29
|
-
"
|
|
29
|
+
"kleur": "^4.1.4",
|
|
30
30
|
"prompts": "^2.4.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
package/lib/assemblyDeploy.d.ts
DELETED
package/lib/auth.d.ts
DELETED
package/lib/cachePlugin.d.ts
DELETED
package/lib/dataverse-utils.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { WebApiConfig } from 'dataverse-webapi/lib/node';
|
|
2
|
-
export declare enum ComponentType {
|
|
3
|
-
WebResource = 61,
|
|
4
|
-
PluginType = 90,
|
|
5
|
-
PluginAssembly = 91,
|
|
6
|
-
SDKMessageProcessingStep = 92,
|
|
7
|
-
SDKMessageProcessingStepImage = 93
|
|
8
|
-
}
|
|
9
|
-
export interface DeployCredentials {
|
|
10
|
-
server: string;
|
|
11
|
-
tenant: string;
|
|
12
|
-
solution: string;
|
|
13
|
-
}
|
|
14
|
-
export interface Choice {
|
|
15
|
-
column: string;
|
|
16
|
-
options: {
|
|
17
|
-
text: string;
|
|
18
|
-
value: number;
|
|
19
|
-
}[];
|
|
20
|
-
}
|
|
21
|
-
export interface TableColumn {
|
|
22
|
-
logicalName: string;
|
|
23
|
-
schemaName: string;
|
|
24
|
-
}
|
|
25
|
-
export interface TableMetadata {
|
|
26
|
-
logicalName: string;
|
|
27
|
-
schemaName: string;
|
|
28
|
-
entitySetName: string;
|
|
29
|
-
fields: TableColumn[];
|
|
30
|
-
choices: Choice[];
|
|
31
|
-
}
|
|
32
|
-
export declare function addToSolution(id: string, solution: string, type: ComponentType, apiConfig: WebApiConfig): Promise<void>;
|
|
33
|
-
export declare function publish(publishXml: string, apiConfig: WebApiConfig): Promise<void>;
|
|
34
|
-
export declare function getTableMetadata(table: string, apiConfig: WebApiConfig): Promise<TableMetadata>;
|
package/lib/deploy.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function deploy(type?: string, files?: string): Promise<void>;
|
package/lib/generate.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function generate(table: string): Promise<void>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { WebApiConfig, Entity } from 'dataverse-webapi/lib/node';
|
|
2
|
-
import { PluginType } from './pluginType';
|
|
3
|
-
export interface PluginAssembly extends Entity {
|
|
4
|
-
name: string;
|
|
5
|
-
content?: string;
|
|
6
|
-
isolationmode?: number;
|
|
7
|
-
version?: string;
|
|
8
|
-
publickeytoken?: string;
|
|
9
|
-
sourcetype?: number;
|
|
10
|
-
culture?: string;
|
|
11
|
-
types?: PluginType[];
|
|
12
|
-
}
|
|
13
|
-
export declare function deploy(config: PluginAssembly, apiConfig: WebApiConfig, solution?: string): Promise<void>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Entity, WebApiConfig } from 'dataverse-webapi/lib/node';
|
|
2
|
-
export interface PluginImage extends Entity {
|
|
3
|
-
name: string;
|
|
4
|
-
entityalias: string;
|
|
5
|
-
attributes: string;
|
|
6
|
-
imagetype: number;
|
|
7
|
-
messagepropertyname: string;
|
|
8
|
-
'sdkmessageprocessingstepid@odata.bind'?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function deployImage(stepId: string, image: PluginImage, message: string | undefined, apiConfig: WebApiConfig): Promise<string>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { WebApiConfig, Entity } from 'dataverse-webapi/lib/node';
|
|
2
|
-
import { PluginImage } from './pluginImage';
|
|
3
|
-
export interface PluginStep extends Entity {
|
|
4
|
-
name: string;
|
|
5
|
-
configuration: number;
|
|
6
|
-
description?: string;
|
|
7
|
-
mode: number;
|
|
8
|
-
rank: number;
|
|
9
|
-
stage: number;
|
|
10
|
-
images?: PluginImage[];
|
|
11
|
-
supporteddeployment: number;
|
|
12
|
-
message?: string;
|
|
13
|
-
entity?: string;
|
|
14
|
-
asyncautodelete?: boolean;
|
|
15
|
-
'plugintypeid@odata.bind'?: string;
|
|
16
|
-
'sdkmessagefilterid@odata.bind'?: string;
|
|
17
|
-
'sdkmessageid@odata.bind'?: string;
|
|
18
|
-
filteringattributes?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare function deployStep(step: PluginStep, apiConfig: WebApiConfig, solution?: string): Promise<string | undefined>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { WebApiConfig, Entity } from 'dataverse-webapi/lib/node';
|
|
2
|
-
import { PluginStep } from './pluginStep';
|
|
3
|
-
export interface PluginType extends Entity {
|
|
4
|
-
name: string;
|
|
5
|
-
'pluginassemblyid@odata.bind'?: string;
|
|
6
|
-
typename: string;
|
|
7
|
-
friendlyname: string;
|
|
8
|
-
steps?: PluginStep[];
|
|
9
|
-
workflowactivitygroupname: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function deployType(type: PluginType, apiConfig: WebApiConfig, solution?: string): Promise<string>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { WebApiConfig } from 'dataverse-webapi/lib/node';
|
|
2
|
-
export interface WebResource {
|
|
3
|
-
displayname: string;
|
|
4
|
-
name: string;
|
|
5
|
-
type: string;
|
|
6
|
-
content: string;
|
|
7
|
-
path: string;
|
|
8
|
-
webresourcetype: number;
|
|
9
|
-
}
|
|
10
|
-
export declare function deploy(webResources: WebResource[], apiConfig: WebApiConfig, solution?: string, files?: string): Promise<void>;
|