New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mendixmodelsdk

Package Overview
Dependencies
Maintainers
1
Versions
1112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mendixmodelsdk - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

64

.test-output/create-unit-deltas-non-prefetch.json
[
{
"deltaType": "CREATE_UNIT",
"unitId": "04bd0a60-5be9-4817-8c9c-2dd06317cc66",
"unitId": "b8ffd709-7267-4d08-a23c-11cb96619947",
"containerId": "eec3241d-13a9-4ba9-940c-5d5223624304",

@@ -10,4 +10,4 @@ "containmentName": "modules",

{
"unitId": "04bd0a60-5be9-4817-8c9c-2dd06317cc66",
"elementId": "04bd0a60-5be9-4817-8c9c-2dd06317cc66",
"unitId": "b8ffd709-7267-4d08-a23c-11cb96619947",
"elementId": "b8ffd709-7267-4d08-a23c-11cb96619947",
"deltaType": "UPDATE_PROPERTY_VALUE",

@@ -22,4 +22,4 @@ "propertyName": "name",

"deltaType": "CREATE_UNIT",
"unitId": "ee0df0b2-592d-4972-9f30-50b26d8a9197",
"containerId": "04bd0a60-5be9-4817-8c9c-2dd06317cc66",
"unitId": "962ba389-0200-4ecd-9bee-7a72029df647",
"containerId": "b8ffd709-7267-4d08-a23c-11cb96619947",
"containmentName": "domainModel",

@@ -30,4 +30,4 @@ "contentType": "DomainModels$DomainModel"

"deltaType": "CREATE_UNIT",
"unitId": "b357a050-7594-41f8-a177-80e2dbac8bd0",
"containerId": "04bd0a60-5be9-4817-8c9c-2dd06317cc66",
"unitId": "0f0402fa-41fa-4010-9038-1a0b32356040",
"containerId": "b8ffd709-7267-4d08-a23c-11cb96619947",
"containmentName": "folders",

@@ -37,4 +37,4 @@ "contentType": "Projects$Folder"

{
"unitId": "b357a050-7594-41f8-a177-80e2dbac8bd0",
"elementId": "b357a050-7594-41f8-a177-80e2dbac8bd0",
"unitId": "0f0402fa-41fa-4010-9038-1a0b32356040",
"elementId": "0f0402fa-41fa-4010-9038-1a0b32356040",
"deltaType": "UPDATE_PROPERTY_VALUE",

@@ -49,4 +49,4 @@ "propertyName": "name",

"deltaType": "CREATE_UNIT",
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"containerId": "b357a050-7594-41f8-a177-80e2dbac8bd0",
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"containerId": "0f0402fa-41fa-4010-9038-1a0b32356040",
"containmentName": "documents",

@@ -56,4 +56,4 @@ "contentType": "Pages$Page"

{
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"elementId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"deltaType": "UPDATE_PROPERTY_VALUE",

@@ -67,4 +67,4 @@ "propertyName": "canvasWidth",

{
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"elementId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"deltaType": "UPDATE_PROPERTY_VALUE",

@@ -78,28 +78,28 @@ "propertyName": "canvasHeight",

{
"parentId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"parentId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementType": "Pages$LayoutCall",
"parentPropertyName": "layoutCall",
"deltaType": "CREATE_ELEMENT",
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"elementId": "fd376e39-79e8-42b9-b5f1-761c83aadc34"
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementId": "57796e56-505a-40a2-aa15-bd5b817ced4c"
},
{
"parentId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"parentId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementType": "Texts$Text",
"parentPropertyName": "title",
"deltaType": "CREATE_ELEMENT",
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"elementId": "5a3933c6-c1e0-479c-a102-88d40eb3c3dc"
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementId": "228e0408-c2a7-4aa4-af80-435614e9ab48"
},
{
"parentId": "5a3933c6-c1e0-479c-a102-88d40eb3c3dc",
"parentId": "228e0408-c2a7-4aa4-af80-435614e9ab48",
"elementType": "Texts$Translation",
"parentPropertyName": "translations",
"deltaType": "CREATE_ELEMENT",
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"elementId": "8083f323-0c6f-4eb5-9794-320adaa67dc2"
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementId": "5766f0dd-cd8e-4685-ae0b-e2fcab9bcfee"
},
{
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"elementId": "8083f323-0c6f-4eb5-9794-320adaa67dc2",
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementId": "5766f0dd-cd8e-4685-ae0b-e2fcab9bcfee",
"deltaType": "UPDATE_PROPERTY_VALUE",

@@ -113,4 +113,4 @@ "propertyName": "languageCode",

{
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"elementId": "8083f323-0c6f-4eb5-9794-320adaa67dc2",
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementId": "5766f0dd-cd8e-4685-ae0b-e2fcab9bcfee",
"deltaType": "UPDATE_PROPERTY_VALUE",

@@ -124,4 +124,4 @@ "propertyName": "text",

{
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"elementId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"deltaType": "UPDATE_PROPERTY_VALUE",

@@ -135,4 +135,4 @@ "propertyName": "popupResizable",

{
"unitId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"elementId": "35c9d03d-7034-4b21-b12e-fca74dbbb79f",
"unitId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"elementId": "bcdd3f3b-5a8c-4d90-b1cc-bddc5b225ca9",
"deltaType": "UPDATE_PROPERTY_VALUE",

@@ -139,0 +139,0 @@ "propertyName": "name",

@@ -15,3 +15,3 @@ var internal = require('./sdk/internal');

var defaultConfig = {
endPoint: "https://model-api.cfapps.io"
endPoint: "https://model.api.mendix.com"
};

@@ -18,0 +18,0 @@ var sdkConfig = lodash.extend({}, defaultConfig, connectionConfig);

@@ -81,2 +81,8 @@ import { configuration } from '../config';

private storeResponseAsFile(response, outFilePath, callback, errorCallback);
private pendingRequests;
private MAX_PARALLEL_REQUESTS;
private runningRequests;
private loadUnitByIdBatched(info);
private sendGetUnitRequest(info);
private completeGetUnitRequest();
}

@@ -10,2 +10,5 @@ var fs = require('fs');

this.transportation = transportation;
this.pendingRequests = [];
this.MAX_PARALLEL_REQUESTS = 100;
this.runningRequests = 0;
}

@@ -49,3 +52,3 @@ ModelApiClientImpl.prototype.createWorkingCopy = function (workingCopyInfo, callback, errorCallback) {

ModelApiClientImpl.prototype.loadUnitById = function (workingCopyId, unitId, callback, errorCallback) {
this.transportation.request("get", "" + apiEndPoint + workingCopyId + "/units/" + unitId, null, callback, errorCallback);
this.loadUnitByIdBatched({ workingCopyId: workingCopyId, unitId: unitId, callback: callback, errorCallback: errorCallback });
};

@@ -90,4 +93,26 @@ ModelApiClientImpl.prototype.sendDeltas = function (workingCopyId, deltas, callback, errorCallback) {

};
ModelApiClientImpl.prototype.loadUnitByIdBatched = function (info) {
if (this.runningRequests < this.MAX_PARALLEL_REQUESTS)
this.sendGetUnitRequest(info);
else
this.pendingRequests.push(info);
};
ModelApiClientImpl.prototype.sendGetUnitRequest = function (info) {
var _this = this;
this.runningRequests += 1;
this.transportation.request("get", "" + apiEndPoint + info.workingCopyId + "/units/" + info.unitId, null, function (data) {
_this.completeGetUnitRequest();
info.callback(data);
}, function (error) {
_this.completeGetUnitRequest();
info.errorCallback(error);
});
};
ModelApiClientImpl.prototype.completeGetUnitRequest = function () {
this.runningRequests -= 1;
if (this.runningRequests < this.MAX_PARALLEL_REQUESTS && this.pendingRequests.length > 0)
this.sendGetUnitRequest(this.pendingRequests.shift());
};
return ModelApiClientImpl;
})();
exports.ModelApiClientImpl = ModelApiClientImpl;

@@ -5,2 +5,4 @@ var version_1 = require('../../version');

var restler; // imported in constructor
var SHORT_TIMEOUT = 1 * 60 * 1000;
var LONG_TIMEOUT = 15 * 60 * 1000;
/**

@@ -36,5 +38,6 @@ * Default implementation of {@link ITransportation} that communicates with the Model API Server over

var options = {
timeout: 5 * 60 * 1000,
timeout: SHORT_TIMEOUT,
headers: {
"mendixmodelsdkversion": version_1.SDK_VERSION
"mendixmodelsdkversion": version_1.SDK_VERSION,
"User-Agent": "mendixmodelsdk/" + version_1.SDK_VERSION + " " + process.platform + " " + process.arch + " node" + process.versions.node
}

@@ -99,2 +102,5 @@ };

}
else if (result['code'] === 'EPIPE') {
console.warn("Encountered EPIPE - assuming failure callback is already called for this request with status code 413 (Request Entity Too Large).");
}
else {

@@ -131,3 +137,3 @@ failure({

options["multipart"] = true;
options.timeout = 5 * 60 * 1000; // 5 minutes: uploading mpk's takes some time, and can be quite large.
options.timeout = LONG_TIMEOUT; // 5 minutes: uploading mpk's takes some time, and can be quite large.
if (!filename)

@@ -147,3 +153,3 @@ throw new Error("File to upload is missing.");

options["decoding"] = "buffer"; // TODO: in the future we might want to use streams here. Currently Restler does not support streams.
options.timeout = 5 * 60 * 1000; // 5 minutes: downloaded mpk's take some time to build, and can be quite large.
options.timeout = LONG_TIMEOUT; //downloaded mpk's take some time to build, and can be quite large.
this.handleRequest(restler[method](url, options), url, null, function (responseData, response) { return success(responseData); }, failure);

@@ -150,0 +156,0 @@ };

@@ -1,2 +0,2 @@

/** Current SDK version: 1.0.1 */
/** Current SDK version: 1.0.2 */
export declare const SDK_VERSION: string;

@@ -1,2 +0,2 @@

/** Current SDK version: 1.0.1 */
exports.SDK_VERSION = "1.0.1";
/** Current SDK version: 1.0.2 */
exports.SDK_VERSION = "1.0.2";
{
"name": "mendixmodelsdk",
"version": "1.0.1",
"version": "1.0.2",
"description": "Mendix Model SDK",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# Release notes Mendix Model SDK
## 1.0.2
This release replaces all previous sdk versions as our api endpoints have been changed and finalized.
Please run `npm update mendixmodelsdk --save`.
| story# | impact | description |
|---|---|---|
| 585226 | High | All model-api infrastructure has been moved to Europe and the default endpoint of the api is updated. |
| 602450 | Low | SDK now throttles requests to avoid spamming our servers. This might degrade performance a little. |
| 606647 | None | SDK now handles EPIPE errors coming from AWS correctly. |
## 1.0.1

@@ -9,3 +20,3 @@

| 600261 | None | Updated the SDK for version 6.0.1 of the Mendix Business Modeler. |
| 593338 | Low | Fixed race condition which occurred sometimes when opening a project |
| 593338 | Low | Fixed race condition which occurred sometimes when opening a project. |

@@ -12,0 +23,0 @@ ## 1.0.0

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc