2
0
mirror of https://github.com/esiur/esiur-js.git synced 2025-05-06 12:32:58 +00:00
This commit is contained in:
Ahmed Zamil 2020-01-23 16:31:30 +03:00
parent 9e86e3fa00
commit 98877b9b85
2 changed files with 50 additions and 42 deletions

View File

@ -1401,6 +1401,7 @@ function (_Promise) {
}, { }, {
key: "trigger", key: "trigger",
value: function trigger(result) { value: function trigger(result) {
if (this.ready) return;
this.result = result; this.result = result;
this.ready = true; this.ready = true;
@ -1420,8 +1421,6 @@ function (_Promise) {
}, { }, {
key: "triggerProgress", key: "triggerProgress",
value: function triggerProgress(type, value, max) { value: function triggerProgress(type, value, max) {
if (this.ready) return;
for (var i = 0; i < this.progressCallbacks.length; i++) { for (var i = 0; i < this.progressCallbacks.length; i++) {
this.progressCallbacks[i](type, value, max, this); this.progressCallbacks[i](type, value, max, this);
} }
@ -1429,8 +1428,6 @@ function (_Promise) {
}, { }, {
key: "triggerChunk", key: "triggerChunk",
value: function triggerChunk(value) { value: function triggerChunk(value) {
if (this.ready) return;
for (var i = 0; i < this.chunkCallbacks.length; i++) { for (var i = 0; i < this.chunkCallbacks.length; i++) {
this.chunkCallbacks[i](value, this); this.chunkCallbacks[i](value, this);
} }
@ -1495,31 +1492,33 @@ var _default = //const ExceptionCode =
{ {
HostNotReachable: 0, HostNotReachable: 0,
AccessDenied: 1, AccessDenied: 1,
ResourceNotFound: 2, UserNotFound: 2,
AttachDenied: 3, ChallengeFailed: 3,
InvalidMethod: 4, ResourceNotFound: 4,
InvokeDenied: 5, AttachDenied: 5,
CreateDenied: 6, InvalidMethod: 6,
AddParentDenied: 7, InvokeDenied: 7,
AddChildDenied: 8, CreateDenied: 8,
ViewAttributeDenied: 9, AddParentDenied: 9,
UpdateAttributeDenied: 10, AddChildDenied: 10,
StoreNotFound: 11, ViewAttributeDenied: 11,
ParentNotFound: 12, UpdateAttributeDenied: 12,
ChildNotFound: 13, StoreNotFound: 13,
ResourceIsNotStore: 14, ParentNotFound: 14,
DeleteDenied: 15, ChildNotFound: 15,
DeleteFailed: 16, ResourceIsNotStore: 16,
UpdateAttributeFailed: 17, DeleteDenied: 17,
GetAttributesFailed: 18, DeleteFailed: 18,
ClearAttributesFailed: 19, UpdateAttributeFailed: 19,
TemplateNotFound: 20, GetAttributesFailed: 20,
RenameDenied: 21, ClearAttributesFailed: 21,
ClassNotFound: 22, TemplateNotFound: 22,
MethodNotFound: 23, RenameDenied: 23,
PropertyNotFound: 24, ClassNotFound: 24,
SetPropertyDenied: 25, MethodNotFound: 25,
ReadOnlyProperty: 26 PropertyNotFound: 26,
SetPropertyDenied: 27,
ReadOnlyProperty: 28
}; };
exports["default"] = _default; exports["default"] = _default;
@ -3159,42 +3158,42 @@ function (_Uint8Array) {
}, { }, {
key: "getInt16Array", key: "getInt16Array",
value: function getInt16Array(offset, length) { value: function getInt16Array(offset, length) {
return new Int16Array(this.buffer, offset, length); return new Int16Array(this.clip(offset, length).buffer);
} }
}, { }, {
key: "getUint16Array", key: "getUint16Array",
value: function getUint16Array(offset, length) { value: function getUint16Array(offset, length) {
return new Uint16Array(this.buffer, offset, length); return new Uint16Array(this.clip(offset, length).buffer);
} }
}, { }, {
key: "getInt32Array", key: "getInt32Array",
value: function getInt32Array(offset, length) { value: function getInt32Array(offset, length) {
return new Int32Array(this.buffer, offset, length); return new Int32Array(this.clip(offset, length).buffer);
} }
}, { }, {
key: "getUint32Array", key: "getUint32Array",
value: function getUint32Array(offset, length) { value: function getUint32Array(offset, length) {
return new Uint32Array(this.buffer, offset, length); return new Uint32Array(this.clip(offset, length).buffer);
} }
}, { }, {
key: "getFloat32Array", key: "getFloat32Array",
value: function getFloat32Array(offset, length) { value: function getFloat32Array(offset, length) {
return new Float32Array(this.buffer, offset, length); return new Float32Array(this.clip(offset, length).buffer);
} }
}, { }, {
key: "getFloat64Array", key: "getFloat64Array",
value: function getFloat64Array(offset, length) { value: function getFloat64Array(offset, length) {
return new Float64Array(this.buffer, offset, length); return new Float64Array(this.clip(offset, length).buffer);
} }
}, { }, {
key: "getInt64Array", key: "getInt64Array",
value: function getInt64Array(offset, length) { value: function getInt64Array(offset, length) {
return new Int64Array(this.buffer, offset, length); return new Int64Array(this.clip(offset, length).buffer);
} }
}, { }, {
key: "getUint64Array", key: "getUint64Array",
value: function getUint64Array(offset, length) { value: function getUint64Array(offset, length) {
return new Uint64Array(this.buffer, offset, length); return new Uint64Array(this.clip(offset, length).buffer);
} }
}, { }, {
key: "getBoolean", key: "getBoolean",
@ -4521,7 +4520,7 @@ function (_IStore) {
this.readyToEstablish = true; this.readyToEstablish = true;
} else { } else {
// incorrect password // incorrect password
this.sendParams().addUint8(0xc0).addInt32(1).addUint16(5).addString("Error").done(); this.sendParams().addUint8(0xc0).addInt32(_ExceptionCode["default"].AccessDenied).addUint16(13).addString("Access Denied").done();
} }
} }
}); });
@ -4559,7 +4558,7 @@ function (_IStore) {
// send establish request // send establish request
this.sendParams().addUint8(0x20).addUint16(0).done(); this.sendParams().addUint8(0x20).addUint16(0).done();
} else { } else {
this.sendParams().addUint8(0xc0).addUint32(1).addUint16(5).addString("Error").done(); this.sendParams().addUint8(0xc0).addUint32(_ExceptionCode["default"].ChallengeFailed).addUint16(16).addString("Challenge Failed").done();
} }
} else if (authPacket.action == _IIPAuthPacketAction["default"].ConnectionEstablished) { } else if (authPacket.action == _IIPAuthPacketAction["default"].ConnectionEstablished) {
this.session.id = authPacket.sessionId; this.session.id = authPacket.sessionId;
@ -9250,8 +9249,17 @@ exports["default"] = void 0;
var _Warehouse = _interopRequireDefault(require("./Resource/Warehouse.js")); var _Warehouse = _interopRequireDefault(require("./Resource/Warehouse.js"));
if (window) window.wh = _Warehouse["default"]; var _Structure = _interopRequireDefault(require("./Data/Structure.js"));
var _DistributedResource = _interopRequireDefault(require("./Net/IIP/DistributedResource.js"));
if (window) {
window.wh = _Warehouse["default"];
window.Structure = _Structure["default"];
window.DistributedResource = _DistributedResource["default"];
}
var _default = _Warehouse["default"]; var _default = _Warehouse["default"];
exports["default"] = _default; exports["default"] = _default;
},{"./Resource/Warehouse.js":65,"@babel/runtime/helpers/interopRequireDefault":9}]},{},[72]); },{"./Data/Structure.js":36,"./Net/IIP/DistributedResource.js":41,"./Resource/Warehouse.js":65,"@babel/runtime/helpers/interopRequireDefault":9}]},{},[72]);

View File

@ -1,6 +1,6 @@
{ {
"name": "esyur", "name": "esyur",
"version": "1.3.9", "version": "1.4.0",
"description": "Distributed Object Framework", "description": "Distributed Object Framework",
"main": "esyur.js", "main": "esyur.js",
"scripts": { "scripts": {