Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnp/config-store

Package Overview
Dependencies
Maintainers
6
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnp/config-store - npm Package Compare versions

Comparing version 1.0.4-3 to 1.0.4-4

10

dist/config-store.es5.js
/**
@license
* @pnp/config-store v1.0.4-3 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnp/blob/master/LICENSE)
* @pnp/config-store v1.0.4-4 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)
* Copyright (c) 2018 Microsoft
* docs: https://pnp.github.io/pnp/
* source: https://github.com/pnp/pnp
* bugs: https://github.com/pnp/pnp/issues
* docs: https://pnp.github.io/pnpjs/
* source: https:github.com/pnp/pnpjs
* bugs: https://github.com/pnp/pnpjs/issues
*/

@@ -10,0 +10,0 @@ import { Dictionary, PnPClientStorage } from '@pnp/common';

/**
@license
* @pnp/config-store v1.0.4-3 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnp/blob/master/LICENSE)
* @pnp/config-store v1.0.4-4 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)
* Copyright (c) 2018 Microsoft
* docs: https://pnp.github.io/pnp/
* source: https://github.com/pnp/pnp
* bugs: https://github.com/pnp/pnp/issues
* docs: https://pnp.github.io/pnpjs/
* source: https:github.com/pnp/pnpjs
* bugs: https://github.com/pnp/pnpjs/issues
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.pnp=t():e.pnp=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,i){"use strict";(function(e){/**
@license
* @pnp/common v1.0.4-3 - pnp - provides shared functionality across all pnp libraries
* MIT (https://github.com/pnp/pnp/blob/master/LICENSE)
* @pnp/common v1.0.4-4 - pnp - provides shared functionality across all pnp libraries
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)
* Copyright (c) 2018 Microsoft
* docs: https://pnp.github.io/pnp/
* source: https://github.com/pnp/pnp
* bugs: https://github.com/pnp/pnp/issues
* docs: https://pnp.github.io/pnpjs/
* source: https:github.com/pnp/pnpjs
* bugs: https://github.com/pnp/pnpjs/issues
*/

@@ -35,8 +35,8 @@ function n(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return function(){t.apply(e,i)}}function r(e,t,i){var n=new Date(e);switch(t.toLowerCase()){case"year":n.setFullYear(n.getFullYear()+i);break;case"quarter":n.setMonth(n.getMonth()+3*i);break;case"month":n.setMonth(n.getMonth()+i);break;case"week":n.setDate(n.getDate()+7*i);break;case"day":n.setDate(n.getDate()+i);break;case"hour":n.setTime(n.getTime()+36e5*i);break;case"minute":n.setTime(n.getTime()+6e4*i);break;case"second":n.setTime(n.getTime()+1e3*i);break;default:n=void 0}return n}function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return!d(e)}).map(function(e){return e.replace(/^[\\|\/]/,"").replace(/[\\|\/]$/,"")}).join("/").replace(/\\/g,"/")}function s(e){for(var t=new Array(e),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n<e;n++)t[n]=i.charAt(Math.floor(Math.random()*i.length));return t.join("")}function a(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?i:3&i|8).toString(16)})}function c(e){return"function"==typeof e}function u(e){return void 0!==e&&null!==e}function h(e){return Array.isArray?Array.isArray(e):e&&"number"==typeof e.length&&e.constructor===Array}function l(e,t,i){if(void 0===i&&(i=!1),!u(t))return e;var n=i?function(e,t){return!(t in e)}:function(){return!0};return Object.getOwnPropertyNames(t).filter(function(t){return n(e,t)}).reduce(function(e,i){return e[i]=t[i],e},e)}function p(e){return/^https?:\/\/|^\/\//i.test(e)}function d(e){return void 0===e||null===e||e.length<1}function f(e,t){if(void 0!==t&&null!==t){new Request("",{headers:t}).headers.forEach(function(t,i){e.append(i,t)})}}i.d(t,"a",function(){return N}),i.d(t,"b",function(){return y});var T=i(1),_=i(9),S=(i.n(_),i(2)),g=(function(){function e(){}e.getCtxCallback=n,e.dateAdd=r,e.combinePaths=o,e.getRandomString=s,e.getGUID=a,e.isFunc=c,e.objectDefinedNotNull=u,e.isArray=h,e.extend=l,e.isUrlAbsolute=p,e.stringIsNullOrEmpty=d}(),function(){function t(){}return t.prototype.fetch=function(t,i){return e.fetch(t,i)},t}()),E=function(e){function t(t){var i=e.call(this)||this;return i._token=t,i}return Object(T.a)(t,e),Object.defineProperty(t.prototype,"token",{get:function(){return this._token},set:function(e){this._token=e},enumerable:!0,configurable:!0}),t.prototype.fetch=function(t,i){void 0===i&&(i={});var n=new Headers;return f(n,i.headers),n.set("Authorization","Bearer "+this._token),i.headers=n,e.prototype.fetch.call(this,t,i)},t}(g),N=(function(e){function t(t,i,n){var r=e.call(this,null)||this;return r.clientId=t,r.tenant=i,r.redirectUri=n,r}Object(T.a)(t,e),t.fromSPFxContext=function(e,i){return void 0===i&&(i="c58637bb-e2e1-4312-8a00-04b5ffcd3403"),new t(i,e.pageContext.aadInfo.tenantId.toString(),o(window.location.origin,"/_forms/spfxsinglesignon.aspx"))},t.prototype.fetch=function(t,i){var n=this;if(!p(t))throw new Error("You must supply absolute urls to AdalClient.fetch.");return this.getToken(this.getResource(t)).then(function(r){return n.token=r,e.prototype.fetch.call(n,t,i)})},t.prototype.getToken=function(e){var i=this;return new Promise(function(n,r){i.ensureAuthContext().then(function(e){return i.login()}).then(function(i){t._authContext.acquireToken(e,function(e,t){if(e)return r(new Error(e));n(t)})}).catch(r)})},t.prototype.ensureAuthContext=function(){var e=this;return new Promise(function(i){null===t._authContext&&(t._authContext=Object(_.inject)({clientId:e.clientId,displayCall:function(t){e._displayCallback&&e._displayCallback(t)},navigateToLoginRequestUrl:!1,redirectUri:e.redirectUri,tenant:e.tenant})),i()})},t.prototype.login=function(){var e=this;return this._loginPromise?this._loginPromise:(this._loginPromise=new Promise(function(i,n){if(t._authContext.getCachedUser())return i();e._displayCallback=function(r){var o=window.open(r,"login","width=483, height=600");if(!o)return n(new Error("Could not open pop-up window for auth. Likely pop-ups are blocked by the browser."));o&&o.focus&&o.focus();var s=window.setInterval(function(){o&&!o.closed&&void 0!==o.closed||window.clearInterval(s);try{-1!==o.document.URL.indexOf(e.redirectUri)&&(window.clearInterval(s),t._authContext.handleWindowCallback(o.location.hash),o.close(),i())}catch(e){n(e)}},30)},e.ensureAuthContext().then(function(i){t._authContext._loginInProgress=!1,t._authContext.login(),e._displayCallback=null})}),this._loginPromise)},t.prototype.getResource=function(e){var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.hostname},t._authContext=null}(E),function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.keys=e,this.values=t}return e.prototype.get=function(e){var t=this.keys.indexOf(e);return t<0?null:this.values[t]},e.prototype.add=function(e,t){var i=this.keys.indexOf(e);i>-1?null===t?this.remove(e):this.values[i]=t:null!==t&&(this.keys.push(e),this.values.push(t))},e.prototype.merge=function(e){var t=this;if("getKeys"in e){var i=e;i.getKeys().map(function(e){t.add(e,i.get(e))})}else{var n=e;for(var r in n)n.hasOwnProperty(r)&&this.add(r,n[r])}},e.prototype.remove=function(e){var t=this.keys.indexOf(e);if(t<0)return null;var i=this.values[t];return this.keys.splice(t,1),this.values.splice(t,1),i},e.prototype.getKeys=function(){return this.keys},e.prototype.getValues=function(){return this.values},e.prototype.clear=function(){this.keys=[],this.values=[]},Object.defineProperty(e.prototype,"count",{get:function(){return this.keys.length},enumerable:!0,configurable:!0}),e}()),O=(function(e){function t(t){var i=e.call(this,t)||this;return i.name="UrlException",S.a.log({data:{},level:3,message:"["+i.name+"]::"+i.message}),i}Object(T.a)(t,e)}(Error),function(){function e(){this._v=new N,this._v.add("defaultCachingStore","session"),this._v.add("defaultCachingTimeoutSeconds",60),this._v.add("globalCacheDisable",!1),this._v.add("enableCacheExpiration",!1),this._v.add("cacheExpirationIntervalMilliseconds",750),this._v.add("spfxContext",null)}return e.prototype.extend=function(e){var t=this;Object.keys(e).forEach(function(i){t._v.add(i,e[i])})},e.prototype.get=function(e){return this._v.get(e)},Object.defineProperty(e.prototype,"defaultCachingStore",{get:function(){return this.get("defaultCachingStore")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultCachingTimeoutSeconds",{get:function(){return this.get("defaultCachingTimeoutSeconds")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalCacheDisable",{get:function(){return this.get("globalCacheDisable")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableCacheExpiration",{get:function(){return this.get("enableCacheExpiration")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cacheExpirationIntervalMilliseconds",{get:function(){return this.get("cacheExpirationIntervalMilliseconds")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spfxContext",{get:function(){return this.get("spfxContext")},enumerable:!0,configurable:!0}),e}()),m=new O,v=m,R=function(){function e(e,t){void 0===t&&(t=-1),this.store=e,this.defaultTimeoutMinutes=t,this.enabled=this.test(),v.enableCacheExpiration&&(S.a.write("Enabling cache expiration.",1),this.cacheExpirationHandler())}return e.prototype.get=function(e){if(!this.enabled)return null;var t=this.store.getItem(e);if(null==t)return null;var i=JSON.parse(t);return new Date(i.expiration)<=new Date?(S.a.write("Removing item with key '"+e+"' from cache due to expiration.",1),this.delete(e),null):i.value},e.prototype.put=function(e,t,i){this.enabled&&this.store.setItem(e,this.createPersistable(t,i))},e.prototype.delete=function(e){this.enabled&&this.store.removeItem(e)},e.prototype.getOrPut=function(e,t,i){var n=this;return this.enabled?new Promise(function(r){var o=n.get(e);null==o?t().then(function(t){n.put(e,t,i),r(t)}):r(o)}):t()},e.prototype.deleteExpired=function(){var e=this;return new Promise(function(t,i){e.enabled||t();try{for(var n=0;n<e.store.length;n++){var r=e.store.key(n);null!==r&&/["|']?pnp["|']? ?: ?1/i.test(e.store.getItem(r))&&e.get(r)}t()}catch(e){i(e)}})},e.prototype.test=function(){try{return this.store.setItem("test","test"),this.store.removeItem("test"),!0}catch(e){return!1}},e.prototype.createPersistable=function(e,t){if(void 0===t){var i=v.defaultCachingTimeoutSeconds;this.defaultTimeoutMinutes>0&&(i=60*this.defaultTimeoutMinutes),t=r(new Date,"second",i)}return JSON.stringify({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;S.a.write("Called cache expiration handler.",0),this.deleteExpired().then(function(t){setTimeout(n(e,e.cacheExpirationHandler),v.cacheExpirationIntervalMilliseconds)}).catch(function(e){S.a.log({data:e,level:3,message:"Error deleting expired cache entries, see data for details. Timeout not reset."})})},e}(),I=function(){function e(e){void 0===e&&(e=new N),this._store=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._store.count},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._store.clear()},e.prototype.getItem=function(e){return this._store.get(e)},e.prototype.key=function(e){return this._store.getKeys()[e]},e.prototype.removeItem=function(e){this._store.remove(e)},e.prototype.setItem=function(e,t){this._store.add(e,t)},e}(),y=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._local=e,this._session=t}return Object.defineProperty(e.prototype,"local",{get:function(){return null===this._local&&(this._local=new R("undefined"!=typeof localStorage?localStorage:new I)),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=new R("undefined"!=typeof sessionStorage?sessionStorage:new I)),this._session},enumerable:!0,configurable:!0}),e}()}).call(t,i(8))},function(e,t,i){"use strict";function n(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}t.a=n;/*! *****************************************************************************

@license
* @pnp/logging v1.0.4-3 - pnp - light-weight, subscribable logging framework
* MIT (https://github.com/pnp/pnp/blob/master/LICENSE)
* @pnp/logging v1.0.4-4 - pnp - light-weight, subscribable logging framework
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)
* Copyright (c) 2018 Microsoft
* docs: https://pnp.github.io/pnp/
* source: https://github.com/pnp/pnp
* bugs: https://github.com/pnp/pnp/issues
* docs: https://pnp.github.io/pnpjs/
* source: https:github.com/pnp/pnpjs
* bugs: https://github.com/pnp/pnpjs/issues
*/

@@ -43,0 +43,0 @@ var n=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new r),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];t.map(function(t){return e.instance.subscribe(t)})},e.clearSubscribers=function(){return e.instance.clearSubscribers()},Object.defineProperty(e,"count",{get:function(){return e.instance.count},enumerable:!0,configurable:!0}),e.write=function(t,i){void 0===i&&(i=0),e.instance.log({level:i,message:t})},e.writeJSON=function(t,i){void 0===i&&(i=0),e.instance.log({level:i,message:JSON.stringify(t)})},e.log=function(t){e.instance.log(t)},e.error=function(t){e.instance.log({data:t,level:3,message:t.message})},e}(),r=function(){function e(e,t){void 0===e&&(e=2),void 0===t&&(t=[]),this.activeLogLevel=e,this.subscribers=t}return e.prototype.subscribe=function(e){this.subscribers.push(e)},e.prototype.clearSubscribers=function(){var e=this.subscribers.slice(0);return this.subscribers.length=0,e},Object.defineProperty(e.prototype,"count",{get:function(){return this.subscribers.length},enumerable:!0,configurable:!0}),e.prototype.write=function(e,t){void 0===t&&(t=0),this.log({level:t,message:e})},e.prototype.log=function(e){void 0!==e&&this.activeLogLevel<=e.level&&this.subscribers.map(function(t){return t.log(e)})},e}();(function(){function e(){}e.prototype.log=function(e){var t=this.format(e);switch(e.level){case 0:case 1:console.log(t);break;case 2:console.warn(t);break;case 3:console.error(t)}},e.prototype.format=function(e){var t=[];return t.push("Message: "+e.message),void 0!==e.data&&t.push(" Data: "+JSON.stringify(e.data)),t.join("")}})(),function(){function e(e){this.method=e}e.prototype.log=function(e){this.method(e)}}()},function(e,t,i){"use strict";var n=i(0),r=i(4),o=function(){function e(e,t,i){this.wrappedProvider=e,this.store=i||this.selectPnPCache(),this.cacheKey="_configcache_"+t}return e.prototype.getWrappedProvider=function(){return this.wrappedProvider},e.prototype.getConfiguration=function(){var e=this;if(!this.store||!this.store.enabled)return this.wrappedProvider.getConfiguration();var t=this.store.get(this.cacheKey);if(t)return new Promise(function(e){e(t)});var i=this.wrappedProvider.getConfiguration();return i.then(function(t){e.store.put(e.cacheKey,t)}),i},e.prototype.selectPnPCache=function(){var e=new n.b;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw new r.a},e}();t.a=o},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(1),r=i(2),o=function(e){function t(t){void 0===t&&(t="Cannot create a caching configuration provider since cache is not available.");var i=e.call(this,t)||this;return i.name="NoCacheAvailableException",r.a.log({data:{},level:3,message:"["+i.name+"]::"+i.message}),i}return n.a(t,e),t}(Error)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(6);i.d(t,"Settings",function(){return n.d}),i.d(t,"CachingConfigurationProvider",function(){return n.a}),i.d(t,"SPListConfigurationProvider",function(){return n.c}),i.d(t,"NoCacheAvailableException",function(){return n.b})},function(e,t,i){"use strict";var n=i(7);i.d(t,"d",function(){return n.a});var r=i(10);i.d(t,"a",function(){return r.a}),i.d(t,"c",function(){return r.b});var o=i(4);i.d(t,"b",function(){return o.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(0),r=function(){function e(){this._settings=new n.a}return e.prototype.add=function(e,t){this._settings.add(e,t)},e.prototype.addJSON=function(e,t){this._settings.add(e,JSON.stringify(t))},e.prototype.apply=function(e){var t=this;return new Promise(function(i,n){try{t._settings.merge(e),i()}catch(e){n(e)}})},e.prototype.load=function(e){var t=this;return new Promise(function(i,n){e.getConfiguration().then(function(e){t._settings.merge(e),i()}).catch(function(e){n(e)})})},e.prototype.get=function(e){return this._settings.get(e)},e.prototype.getJSON=function(e){var t=this.get(e);return void 0===t||null===t?t:JSON.parse(t)},e}()},function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t){

/**
@license
* @pnp/config-store v1.0.4-3 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnp/blob/master/LICENSE)
* @pnp/config-store v1.0.4-4 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)
* Copyright (c) 2018 Microsoft
* docs: https://pnp.github.io/pnp/
* source: https://github.com/pnp/pnp
* bugs: https://github.com/pnp/pnp/issues
* docs: https://pnp.github.io/pnpjs/
* source: https:github.com/pnp/pnpjs
* bugs: https://github.com/pnp/pnpjs/issues
*/

@@ -10,0 +10,0 @@ (function (global, factory) {

/**
@license
* @pnp/config-store v1.0.4-3 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnp/blob/master/LICENSE)
* @pnp/config-store v1.0.4-4 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)
* Copyright (c) 2018 Microsoft
* docs: https://pnp.github.io/pnp/
* source: https://github.com/pnp/pnp
* bugs: https://github.com/pnp/pnp/issues
* docs: https://pnp.github.io/pnpjs/
* source: https:github.com/pnp/pnpjs
* bugs: https://github.com/pnp/pnpjs/issues
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@pnp/common"),require("tslib"),require("@pnp/logging")):"function"==typeof define&&define.amd?define(["exports","@pnp/common","tslib","@pnp/logging"],t):t((e.pnp=e.pnp||{},e.pnp["config-store"]={}),e.pnp.common,e.tslib_1,e.pnp.logging)}(this,function(e,t,i,n){"use strict";var o=function(){function e(){this._settings=new t.Dictionary}return e.prototype.add=function(e,t){this._settings.add(e,t)},e.prototype.addJSON=function(e,t){this._settings.add(e,JSON.stringify(t))},e.prototype.apply=function(e){var t=this;return new Promise(function(i,n){try{t._settings.merge(e),i()}catch(e){n(e)}})},e.prototype.load=function(e){var t=this;return new Promise(function(i,n){e.getConfiguration().then(function(e){t._settings.merge(e),i()}).catch(function(e){n(e)})})},e.prototype.get=function(e){return this._settings.get(e)},e.prototype.getJSON=function(e){var t=this.get(e);return void 0===t||null===t?t:JSON.parse(t)},e}(),r=function(e){function t(t){void 0===t&&(t="Cannot create a caching configuration provider since cache is not available.");var i=e.call(this,t)||this;return i.name="NoCacheAvailableException",n.Logger.log({data:{},level:3,message:"["+i.name+"]::"+i.message}),i}return i.__extends(t,e),t}(Error),s=function(){function e(e,t,i){this.wrappedProvider=e,this.store=i||this.selectPnPCache(),this.cacheKey="_configcache_"+t}return e.prototype.getWrappedProvider=function(){return this.wrappedProvider},e.prototype.getConfiguration=function(){var e=this;if(!this.store||!this.store.enabled)return this.wrappedProvider.getConfiguration();var t=this.store.get(this.cacheKey);if(t)return new Promise(function(e){e(t)});var i=this.wrappedProvider.getConfiguration();return i.then(function(t){e.store.put(e.cacheKey,t)}),i},e.prototype.selectPnPCache=function(){var e=new t.PnPClientStorage;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw new r},e}(),a=function(){function e(e,t,i,n){void 0===t&&(t="config"),void 0===i&&(i="Title"),void 0===n&&(n="Value"),this.sourceWeb=e,this.sourceListTitle=t,this.keyFieldName=i,this.valueFieldName=n}return Object.defineProperty(e.prototype,"web",{get:function(){return this.sourceWeb},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"listTitle",{get:function(){return this.sourceListTitle},enumerable:!0,configurable:!0}),e.prototype.getConfiguration=function(){var e=this;return this.web.lists.getByTitle(this.listTitle).items.select(this.keyFieldName,this.valueFieldName).get().then(function(t){return t.reduce(function(t,i){return Object.defineProperty(t,i[e.keyFieldName],{configurable:!1,enumerable:!1,value:i[e.valueFieldName],writable:!1})},{})})},e.prototype.asCaching=function(){var e="splist_"+this.web.toUrl()+"+"+this.listTitle;return new s(this,e)},e}();e.Settings=o,e.CachingConfigurationProvider=s,e.SPListConfigurationProvider=a,e.NoCacheAvailableException=r,Object.defineProperty(e,"__esModule",{value:!0})});
/**
@license
* @pnp/config-store v1.0.4-3 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnp/blob/master/LICENSE)
* @pnp/config-store v1.0.4-4 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)
* Copyright (c) 2018 Microsoft
* docs: https://pnp.github.io/pnp/
* source: https://github.com/pnp/pnp
* bugs: https://github.com/pnp/pnp/issues
* docs: https://pnp.github.io/pnpjs/
* source: https:github.com/pnp/pnpjs
* bugs: https://github.com/pnp/pnpjs/issues
*/

@@ -10,0 +10,0 @@ import { Dictionary, PnPClientStorage } from '@pnp/common';

{
"name": "@pnp/config-store",
"version": "1.0.4-3",
"version": "1.0.4-4",
"description": "pnp - provides a way to manage configuration within your application",

@@ -11,5 +11,5 @@ "main": "./dist/config-store.es5.umd.js",

"peerDependencies": {
"@pnp/common": "1.0.4-3",
"@pnp/sp": "1.0.4-3",
"@pnp/logging": "1.0.4-3"
"@pnp/common": "1.0.4-4",
"@pnp/sp": "1.0.4-4",
"@pnp/logging": "1.0.4-4"
},

@@ -21,8 +21,8 @@ "author": {

"bugs": {
"url": "https://github.com/pnp/pnp/issues"
"url": "https://github.com/pnp/pnpjs/issues"
},
"homepage": "https://github.com/pnp/pnp",
"homepage": "https:github.com/pnp/pnpjs",
"repository": {
"type": "git",
"url": "git://github.com/pnp/pnp"
"url": "git:github.com/pnp/pnpjs"
},

@@ -29,0 +29,0 @@ "module": "./dist/config-store.es5.js",

@@ -13,3 +13,3 @@ ![SharePoint Patterns and Practices](https://devofficecdn.azureedge.net/media/Default/PnP/sppnp.png)

Please see the public site for [package documentation](https://pnp.github.io/pnp/).
Please see the public site for [package documentation](https://pnp.github.io/pnpjs/).

@@ -16,0 +16,0 @@ ### Code of Conduct

Sorry, the diff of this file is too big to display

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