Socket
Socket
Sign inDemoInstall

@memberjunction/core

Package Overview
Dependencies
Maintainers
2
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@memberjunction/core - npm Package Compare versions

Comparing version 0.9.3 to 0.9.4

2

dist/generic/baseEntity.js

@@ -448,4 +448,4 @@ "use strict";

}
exports.BaseEntity = BaseEntity;
BaseEntity._globalProviderKey = 'MJ_BaseEntityProvider';
exports.BaseEntity = BaseEntity;
//# sourceMappingURL=baseEntity.js.map

@@ -16,3 +16,3 @@ "use strict";

RecordChangeStatus[RecordChangeStatus["Error"] = 3] = "Error";
})(RecordChangeStatus = exports.RecordChangeStatus || (exports.RecordChangeStatus = {}));
})(RecordChangeStatus || (exports.RecordChangeStatus = RecordChangeStatus = {}));
/**

@@ -88,3 +88,3 @@ * Record Change object has information on a change to a record in the Record Changes entity

EntityPermissionType[EntityPermissionType["Delete"] = 4] = "Delete";
})(EntityPermissionType = exports.EntityPermissionType || (exports.EntityPermissionType = {}));
})(EntityPermissionType || (exports.EntityPermissionType = EntityPermissionType = {}));
class EntityUserPermissionInfo {

@@ -156,3 +156,3 @@ }

EntityFieldTSType[EntityFieldTSType["Boolean"] = 4] = "Boolean";
})(EntityFieldTSType = exports.EntityFieldTSType || (exports.EntityFieldTSType = {}));
})(EntityFieldTSType || (exports.EntityFieldTSType = EntityFieldTSType = {}));
var EntityFieldValueListType;

@@ -163,3 +163,3 @@ (function (EntityFieldValueListType) {

EntityFieldValueListType[EntityFieldValueListType["ListOrUserEntry"] = 2] = "ListOrUserEntry";
})(EntityFieldValueListType = exports.EntityFieldValueListType || (exports.EntityFieldValueListType = {}));
})(EntityFieldValueListType || (exports.EntityFieldValueListType = EntityFieldValueListType = {}));
class EntityFieldValueInfo extends baseInfo_1.BaseInfo {

@@ -185,3 +185,3 @@ constructor(initData) {

GeneratedFormSectionType[GeneratedFormSectionType["Category"] = 2] = "Category";
})(GeneratedFormSectionType = exports.GeneratedFormSectionType || (exports.GeneratedFormSectionType = {}));
})(GeneratedFormSectionType || (exports.GeneratedFormSectionType = GeneratedFormSectionType = {}));
/**

@@ -638,3 +638,3 @@ * Field information within an entity - object models data from the Entity Fields entity in the metadata

ValidationErrorType[ValidationErrorType["Warning"] = 1] = "Warning";
})(ValidationErrorType = exports.ValidationErrorType || (exports.ValidationErrorType = {}));
})(ValidationErrorType || (exports.ValidationErrorType = ValidationErrorType = {}));
class ValidationErrorInfo {

@@ -641,0 +641,0 @@ constructor(Source, Message, Value, Type = ValidationErrorType.Failure) {

@@ -93,2 +93,3 @@ import { BaseEntity } from "./baseEntity";

SaveLocalMetadataToStorage(): Promise<void>;
RemoveLocalMetadataFromStorage(): Promise<void>;
/**

@@ -95,0 +96,0 @@ * Always retrieves data from the server - this method does NOT check cache. To use cached local values if available, call GetAndCacheDatasetByName() instead

@@ -37,3 +37,3 @@ "use strict";

EntityDataProviderType[EntityDataProviderType["Network"] = 2] = "Network";
})(EntityDataProviderType = exports.EntityDataProviderType || (exports.EntityDataProviderType = {}));
})(EntityDataProviderType || (exports.EntityDataProviderType = EntityDataProviderType = {}));
class EntitySaveOptions {

@@ -40,0 +40,0 @@ constructor() {

@@ -88,4 +88,9 @@ import { DatasetItemFilterType, DatasetResultType, DatasetStatusResultType, EntityRecordNameInput, EntityRecordNameResult, ILocalStorageProvider, IMetadataProvider } from "./interfaces";

*/
SaveLocalMetadataToStorage(): void;
SaveLocalMetadataToStorage(): Promise<void>;
/**
* Removes all the metadata from the local persistent storage method (which varies by provider). This generally shouldn't need to be called externally but is available to force an complete removal of local metadata in storage.
* NOTE: this does not remove Datasets, for removing datasets, use ClearDatasetCache()
*/
RemoveLocalMetadataFromStorage(): Promise<void>;
/**
* Returns the local storage provider. This is used to store metadata locally on the client.

@@ -92,0 +97,0 @@ * @returns - the local storage provider

@@ -135,6 +135,13 @@ "use strict";

*/
SaveLocalMetadataToStorage() {
Metadata.Provider.SaveLocalMetadataToStorage();
async SaveLocalMetadataToStorage() {
await Metadata.Provider.SaveLocalMetadataToStorage();
}
/**
* Removes all the metadata from the local persistent storage method (which varies by provider). This generally shouldn't need to be called externally but is available to force an complete removal of local metadata in storage.
* NOTE: this does not remove Datasets, for removing datasets, use ClearDatasetCache()
*/
async RemoveLocalMetadataFromStorage() {
await Metadata.Provider.RemoveLocalMetadataFromStorage();
}
/**
* Returns the local storage provider. This is used to store metadata locally on the client.

@@ -226,4 +233,4 @@ * @returns - the local storage provider

}
exports.Metadata = Metadata;
Metadata._globalProviderKey = 'MJ_MetadataProvider';
exports.Metadata = Metadata;
//# sourceMappingURL=metadata.js.map

@@ -132,4 +132,6 @@ import { BaseEntity } from "./baseEntity";

private static localStorageAuthorizationsKey;
private static localStorageKeys;
SaveLocalMetadataToStorage(): Promise<void>;
RemoveLocalMetadataFromStorage(): Promise<void>;
protected abstract get Metadata(): IMetadataProvider;
}

@@ -78,3 +78,3 @@ "use strict";

const f = this.BuildDatasetFilterFromConfig();
const d = await this.GetDatasetByName(ProviderBase._mjMetadataDatasetName, f.length > 0 ? f : null);
const d = await this.GetDatasetByName(_a._mjMetadataDatasetName, f.length > 0 ? f : null);
const end1 = new Date().getTime();

@@ -316,3 +316,3 @@ console.log(`GetAllMetadata - GetDatasetByName took ${end1 - start1}ms`);

GetDatasetCacheKey(datasetName, itemFilters) {
return ProviderBase.localStorageRootKey + '__DATASET__' + datasetName + this.ConvertItemFiltersToUniqueKey(itemFilters);
return _a.localStorageRootKey + '__DATASET__' + datasetName + this.ConvertItemFiltersToUniqueKey(itemFilters);
}

@@ -349,3 +349,3 @@ ConvertItemFiltersToUniqueKey(itemFilters) {

const f = this.BuildDatasetFilterFromConfig();
const d = await this.GetDatasetStatusByName(ProviderBase._mjMetadataDatasetName, f.length > 0 ? f : null);
const d = await this.GetDatasetStatusByName(_a._mjMetadataDatasetName, f.length > 0 ? f : null);
if (d && d.Success) {

@@ -464,10 +464,10 @@ const ret = d.EntityUpdateDates.map(e => {

// execution environment supports local storage, use it
this._latestLocalMetadataTimestamps = JSON.parse(await ls.getItem(ProviderBase.localStorageTimestampsKey));
const e = JSON.parse(await ls.getItem(ProviderBase.localStorageEntitiesKey));
const a = JSON.parse(await ls.getItem(ProviderBase.localStorageApplicationsKey));
const cu = JSON.parse(await ls.getItem(ProviderBase.localStorageCurrentUserKey));
const r = JSON.parse(await ls.getItem(ProviderBase.localStorageRolesKey));
const rls = JSON.parse(await ls.getItem(ProviderBase.localStorageRowLevelSecurityFiltersKey));
const alt = JSON.parse(await ls.getItem(ProviderBase.localStorageAuditLogTypesKey));
const ai = JSON.parse(await ls.getItem(ProviderBase.localStorageAuthorizationsKey));
this._latestLocalMetadataTimestamps = JSON.parse(await ls.getItem(_a.localStorageTimestampsKey));
const e = JSON.parse(await ls.getItem(_a.localStorageEntitiesKey));
const a = JSON.parse(await ls.getItem(_a.localStorageApplicationsKey));
const cu = JSON.parse(await ls.getItem(_a.localStorageCurrentUserKey));
const r = JSON.parse(await ls.getItem(_a.localStorageRolesKey));
const rls = JSON.parse(await ls.getItem(_a.localStorageRowLevelSecurityFiltersKey));
const alt = JSON.parse(await ls.getItem(_a.localStorageAuditLogTypesKey));
const ai = JSON.parse(await ls.getItem(_a.localStorageAuthorizationsKey));
this.UpdateLocalMetadata({

@@ -493,10 +493,10 @@ AllEntities: e,

// execution environment supports local storage, use it
await ls.setItem(ProviderBase.localStorageTimestampsKey, JSON.stringify(this._latestLocalMetadataTimestamps));
await ls.setItem(ProviderBase.localStorageEntitiesKey, JSON.stringify(this._entities));
await ls.setItem(ProviderBase.localStorageApplicationsKey, JSON.stringify(this._applications));
await ls.setItem(ProviderBase.localStorageCurrentUserKey, JSON.stringify(this._currentUser));
await ls.setItem(ProviderBase.localStorageRolesKey, JSON.stringify(this._roles));
await ls.setItem(ProviderBase.localStorageRowLevelSecurityFiltersKey, JSON.stringify(this._rowLevelSecurityFilters));
await ls.setItem(ProviderBase.localStorageAuditLogTypesKey, JSON.stringify(this._auditLogTypes));
await ls.setItem(ProviderBase.localStorageAuthorizationsKey, JSON.stringify(this._authorizations));
await ls.setItem(_a.localStorageTimestampsKey, JSON.stringify(this._latestLocalMetadataTimestamps));
await ls.setItem(_a.localStorageEntitiesKey, JSON.stringify(this._entities));
await ls.setItem(_a.localStorageApplicationsKey, JSON.stringify(this._applications));
await ls.setItem(_a.localStorageCurrentUserKey, JSON.stringify(this._currentUser));
await ls.setItem(_a.localStorageRolesKey, JSON.stringify(this._roles));
await ls.setItem(_a.localStorageRowLevelSecurityFiltersKey, JSON.stringify(this._rowLevelSecurityFilters));
await ls.setItem(_a.localStorageAuditLogTypesKey, JSON.stringify(this._auditLogTypes));
await ls.setItem(_a.localStorageAuthorizationsKey, JSON.stringify(this._authorizations));
}

@@ -509,3 +509,16 @@ }

}
async RemoveLocalMetadataFromStorage() {
try {
const ls = this.LocalStorageProvider;
for (let i = 0; i < _a.localStorageKeys.length; i++) {
await ls.remove(_a.localStorageKeys[i]);
}
}
catch (e) {
// some enviroments don't support local storage
(0, logging_1.LogError)(e);
}
}
}
exports.ProviderBase = ProviderBase;
_a = ProviderBase;

@@ -522,3 +535,12 @@ ProviderBase._mjMetadataDatasetName = 'MJ_Metadata';

ProviderBase.localStorageAuthorizationsKey = _a.localStorageRootKey + '_Authorizations';
exports.ProviderBase = ProviderBase;
ProviderBase.localStorageKeys = [
_a.localStorageTimestampsKey,
_a.localStorageEntitiesKey,
_a.localStorageApplicationsKey,
_a.localStorageCurrentUserKey,
_a.localStorageRolesKey,
_a.localStorageRowLevelSecurityFiltersKey,
_a.localStorageAuditLogTypesKey,
_a.localStorageAuthorizationsKey
];
//# sourceMappingURL=providerBase.js.map

@@ -25,4 +25,4 @@ "use strict";

}
exports.RunReport = RunReport;
RunReport._globalProviderKey = 'MJ_RunReportProvider';
exports.RunReport = RunReport;
//# sourceMappingURL=runReport.js.map

@@ -34,4 +34,4 @@ "use strict";

}
exports.RunView = RunView;
RunView._globalProviderKey = 'MJ_RunViewProvider';
exports.RunView = RunView;
//# sourceMappingURL=runView.js.map

@@ -159,3 +159,3 @@ "use strict";

AuthorizationRoleType[AuthorizationRoleType["Deny"] = 2] = "Deny";
})(AuthorizationRoleType = exports.AuthorizationRoleType || (exports.AuthorizationRoleType = {}));
})(AuthorizationRoleType || (exports.AuthorizationRoleType = AuthorizationRoleType = {}));
class AuthorizationRoleInfo extends baseInfo_1.BaseInfo {

@@ -162,0 +162,0 @@ get RoleInfo() {

@@ -24,3 +24,3 @@ "use strict";

ViewFilterLogicInfo[ViewFilterLogicInfo["Or"] = 2] = "Or";
})(ViewFilterLogicInfo = exports.ViewFilterLogicInfo || (exports.ViewFilterLogicInfo = {}));
})(ViewFilterLogicInfo || (exports.ViewFilterLogicInfo = ViewFilterLogicInfo = {}));
class ViewFilterInfo extends baseInfo_1.BaseInfo {

@@ -27,0 +27,0 @@ constructor(initData = null) {

@@ -7,2 +7,3 @@ "use strict";

const metadata_1 = require("./generic/metadata");
const runReport_1 = require("./generic/runReport");
const runView_1 = require("./views/runView");

@@ -20,4 +21,4 @@ var metadata_2 = require("./generic/metadata");

Object.defineProperty(exports, "ViewColumnInfo", { enumerable: true, get: function () { return UserViewEntityBase_1.ViewColumnInfo; } });
var runReport_1 = require("./generic/runReport");
Object.defineProperty(exports, "RunReport", { enumerable: true, get: function () { return runReport_1.RunReport; } });
var runReport_2 = require("./generic/runReport");
Object.defineProperty(exports, "RunReport", { enumerable: true, get: function () { return runReport_2.RunReport; } });
var interfaces_1 = require("./generic/interfaces");

@@ -80,4 +81,5 @@ Object.defineProperty(exports, "ProviderConfigDataBase", { enumerable: true, get: function () { return interfaces_1.ProviderConfigDataBase; } });

runView_1.RunView.Provider = provider;
runReport_1.RunReport.Provider = provider;
}
exports.SetProvider = SetProvider;
//# sourceMappingURL=index.js.map

@@ -34,4 +34,4 @@ "use strict";

}
exports.RunView = RunView;
RunView._globalProviderKey = 'MJ_RunViewProvider';
exports.RunView = RunView;
//# sourceMappingURL=runView.js.map

@@ -330,6 +330,6 @@ "use strict";

};
UserViewEntityBase = __decorate([
exports.UserViewEntityBase = UserViewEntityBase;
exports.UserViewEntityBase = UserViewEntityBase = __decorate([
(0, global_1.RegisterClass)(baseEntity_1.BaseEntity, 'User Views', -1) // -1 priority because we want the generated UserViewEntity class to be used ahead of this and it gets generated with a priority of 0 by default
], UserViewEntityBase);
exports.UserViewEntityBase = UserViewEntityBase;
class ViewInfo {

@@ -428,3 +428,3 @@ /**

ViewFilterLogicInfo[ViewFilterLogicInfo["Or"] = 2] = "Or";
})(ViewFilterLogicInfo = exports.ViewFilterLogicInfo || (exports.ViewFilterLogicInfo = {}));
})(ViewFilterLogicInfo || (exports.ViewFilterLogicInfo = ViewFilterLogicInfo = {}));
class ViewFilterInfo extends baseInfo_1.BaseInfo {

@@ -452,3 +452,3 @@ constructor(initData = null) {

ViewSortDirectionInfo[ViewSortDirectionInfo["Desc"] = 2] = "Desc";
})(ViewSortDirectionInfo = exports.ViewSortDirectionInfo || (exports.ViewSortDirectionInfo = {}));
})(ViewSortDirectionInfo || (exports.ViewSortDirectionInfo = ViewSortDirectionInfo = {}));
class ViewSortInfo extends baseInfo_1.BaseInfo {

@@ -455,0 +455,0 @@ constructor(initData = null) {

{
"name": "@memberjunction/core",
"version": "0.9.3",
"version": "0.9.4",
"description": "MemberJunction: Core Library including Metadata, Application, and Entity Retrieval and Manipulation",

@@ -22,4 +22,4 @@ "main": "dist/index.js",

"dependencies": {
"@memberjunction/global" : "^0.9.1"
"@memberjunction/global": "^0.9.1"
}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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