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

gd-sprest

Package Overview
Dependencies
Maintainers
0
Versions
841
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gd-sprest - npm Package Compare versions

Comparing version 8.0.8 to 8.0.9

58

build/helper/methods/loadSPCore.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadSPCore = void 0;
var executor_1 = require("../executor");
/**

@@ -11,31 +12,34 @@ * Loads the core SharePoint JavaScript library for JSOM.

// Define the core libraries to load
var libs = ["init", "MicrosoftAjax", "SP.Runtime", "SP"];
var _loop_1 = function (i) {
var libName = libs[i];
// See if a script already exists
if (document.querySelector("script[title='" + libName + "']") == null) {
// Log
console.debug("[gd-sprest] Loading the core library: " + libName);
// Create the script element to load the library
var elScript_1 = document.createElement("script");
elScript_1.title = libName;
elScript_1.src = document.location.origin + "/_layouts/15/" + libName + ".js";
// Wait for the previous library to load
setTimeout(function () {
// Load the script
document.head.appendChild(elScript_1);
}, 10 * i);
}
else {
// Log
console.debug("[gd-sprest] Core library already loaded: " + libName);
}
};
var libs = ["init", "MicrosoftAjax", "SP.Runtime", "SP", "SP.Init"];
// Parse the libraries
for (var i = 0; i < libs.length; i++) {
_loop_1(i);
}
// Resolve the request
resolve();
var counter = 0;
executor_1.Executor(libs, function (libName) {
// Return a promise
return new Promise(function (resolve) {
// See if a script already exists
if (document.querySelector("script[title='" + libName + "']") == null) {
// Log
console.debug("[gd-sprest] Loading the core library: " + libName);
// Create the script element to load the library
var elScript_1 = document.createElement("script");
elScript_1.title = libName;
elScript_1.src = document.location.origin + "/_layouts/15/" + libName + ".js";
// Wait for the previous library to load
setTimeout(function () {
// Load the script
document.head.appendChild(elScript_1);
// Resolve the request
resolve(null);
}, 10 * counter++);
}
else {
// Log
console.debug("[gd-sprest] Core library already loaded: " + libName);
}
}).then(function () {
// Resolve the request after all the libraries have been requested
resolve();
});
});
});
};

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

exports.$REST = {
__ver: 8.08,
__ver: 8.09,
AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },

@@ -15,0 +15,0 @@ Apps: Lib.Apps,

{
"name": "gd-sprest",
"version": "8.0.8",
"version": "8.0.9",
"description": "An easy way to develop against the SharePoint REST API.",

@@ -5,0 +5,0 @@ "author": "Gunjan Datta <me@dattabase.com> (https://gunjandatta.github.io)",

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

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

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