dataverse-utils 2.6.5 → 2.6.7
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/lib/assemblyDeploy.js +1 -1
- package/lib/models/customApi.js +4 -1
- package/lib/models/pluginAssembly.js +4 -1
- package/lib/models/pluginImage.js +4 -1
- package/lib/models/pluginPackage.js +4 -1
- package/lib/models/pluginStep.js +4 -1
- package/lib/models/pluginType.js +4 -1
- package/lib/models/webResource.js +5 -2
- package/package.json +1 -1
package/lib/assemblyDeploy.js
CHANGED
|
@@ -31,7 +31,7 @@ async function assemblyDeploy(creds, apiConfig) {
|
|
|
31
31
|
logger_1.logger.done(`deployed plugin package ${config.prefix}_${config.name}\r\n`);
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
logger_1.logger.info(
|
|
34
|
+
logger_1.logger.info(`deploy assembly to ${creds.server}`);
|
|
35
35
|
try {
|
|
36
36
|
assemblyId = await (0, pluginAssembly_1.deployAssembly)(config, apiConfig, creds.solution);
|
|
37
37
|
}
|
package/lib/models/customApi.js
CHANGED
|
@@ -65,5 +65,8 @@ async function updateApi(id, api, apiConfig) {
|
|
|
65
65
|
else {
|
|
66
66
|
record['PluginTypeId@odata.bind'] = null;
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
const result = (0, node_1.update)(apiConfig, 'customapis', id, api);
|
|
69
|
+
if (result.error) {
|
|
70
|
+
throw new Error(result.error.message);
|
|
71
|
+
}
|
|
69
72
|
}
|
|
@@ -88,5 +88,8 @@ async function updateAssembly(id, config, content, apiConfig) {
|
|
|
88
88
|
content: content,
|
|
89
89
|
version: config.version
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
const result = await (0, node_1.update)(apiConfig, 'pluginassemblies', id, assembly);
|
|
92
|
+
if (result.error) {
|
|
93
|
+
throw new Error(result.error.message);
|
|
94
|
+
}
|
|
92
95
|
}
|
|
@@ -57,5 +57,8 @@ async function createImage(image, stepName, apiConfig) {
|
|
|
57
57
|
}
|
|
58
58
|
async function updateImage(id, image, stepName, apiConfig) {
|
|
59
59
|
logger_1.logger.info(`update plugin image ${image.name} for step ${stepName}`);
|
|
60
|
-
|
|
60
|
+
const result = await (0, node_1.update)(apiConfig, 'sdkmessageprocessingstepimages', id, image);
|
|
61
|
+
if (result.error) {
|
|
62
|
+
throw new Error(result.error.message);
|
|
63
|
+
}
|
|
61
64
|
}
|
|
@@ -82,5 +82,8 @@ async function updatePackage(id, config, content, apiConfig) {
|
|
|
82
82
|
content: content,
|
|
83
83
|
version: config.version
|
|
84
84
|
};
|
|
85
|
-
|
|
85
|
+
const result = await (0, node_1.update)(apiConfig, 'pluginpackages', id, updated);
|
|
86
|
+
if (result.error) {
|
|
87
|
+
throw new Error(result.error.message);
|
|
88
|
+
}
|
|
86
89
|
}
|
package/lib/models/pluginStep.js
CHANGED
|
@@ -88,5 +88,8 @@ async function createStep(step, apiConfig, solution) {
|
|
|
88
88
|
}
|
|
89
89
|
async function updateStep(id, step, apiConfig) {
|
|
90
90
|
logger_1.logger.info(`update plugin step ${step.name}`);
|
|
91
|
-
|
|
91
|
+
const result = await (0, node_1.update)(apiConfig, 'sdkmessageprocessingsteps', id, step);
|
|
92
|
+
if (result.error) {
|
|
93
|
+
throw new Error(result.error.message);
|
|
94
|
+
}
|
|
92
95
|
}
|
package/lib/models/pluginType.js
CHANGED
|
@@ -60,5 +60,8 @@ async function createType(type, apiConfig) {
|
|
|
60
60
|
}
|
|
61
61
|
async function updateType(id, type, apiConfig) {
|
|
62
62
|
logger_1.logger.info(`update assembly type ${type.name}`);
|
|
63
|
-
|
|
63
|
+
const result = await (0, node_1.update)(apiConfig, 'plugintypes', id, type);
|
|
64
|
+
if (result.error) {
|
|
65
|
+
throw new Error(result.error.message);
|
|
66
|
+
}
|
|
64
67
|
}
|
|
@@ -45,7 +45,7 @@ async function deploy(webResources, apiConfig, solution, files) {
|
|
|
45
45
|
if (files) {
|
|
46
46
|
resources = [];
|
|
47
47
|
for (const file of files.split(',')) {
|
|
48
|
-
const resource = webResources.filter(r => r.path?.endsWith(file));
|
|
48
|
+
const resource = webResources.filter((r) => r.path?.endsWith(file));
|
|
49
49
|
if (resource.length === 0) {
|
|
50
50
|
logger_1.logger.warn(`web resource ${file} not found in dataverse.config.json`);
|
|
51
51
|
continue;
|
|
@@ -122,6 +122,9 @@ async function updateResource(id, resource, content, apiConfig) {
|
|
|
122
122
|
const webResource = {
|
|
123
123
|
content: content
|
|
124
124
|
};
|
|
125
|
-
await (0, node_1.update)(apiConfig, 'webresourceset', id, webResource);
|
|
125
|
+
const result = await (0, node_1.update)(apiConfig, 'webresourceset', id, webResource);
|
|
126
|
+
if (result.error) {
|
|
127
|
+
throw new Error(result.error.message);
|
|
128
|
+
}
|
|
126
129
|
return `<webresource>{${id}}</webresource>`;
|
|
127
130
|
}
|