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

gd-sprest-def

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gd-sprest-def - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

1

base.d.ts

@@ -126,2 +126,3 @@ /**

metadataType?: any;
name?: string;
replaceEndpointFl?: boolean;

@@ -128,0 +129,0 @@ requestType?: number;

@@ -126,2 +126,3 @@ /**

metadataType?: any;
name?: string;
replaceEndpointFl?: boolean;

@@ -128,0 +129,0 @@ requestType?: number;

51

main.js

@@ -806,2 +806,3 @@ let fs = require("fs");

let mapperKey = mapperKeys[i];
let mapperMethods = [];

@@ -813,3 +814,4 @@ // Add the lib

// See if this is not a collection
if (/\.Collection$/.test(mapperKey) == false) {
let isCollection = /\.Collection$/.test(mapperKey);
if (!isCollection) {
// Add the optional properties

@@ -820,6 +822,9 @@ mapperDef.push('\t\tproperties?: Array<string>;');

// See if this type is queryable
if (hasCollections[mapperKey]) {
if (hasCollections[mapperKey] || isCollection) {
// Add the query method
mapperDef.push('\t\tquery: IMapperMethod & { argNames: ["oData"] },')
mapperContent.push('\t\tquery: { argNames: ["oData"], requestType: RequestType.OData },');
mapperMethods.push({
name: "query",
def: '\t\tquery: IMapperMethod & { argNames: ["oData"] },\n',
method: '\t\tquery: { argNames: ["oData"], requestType: RequestType.OData },\n'
});
}

@@ -848,15 +853,31 @@

// Add the method
mapperDef.push([
'\t\t' + methodName + ': IMapperMethod & {\n',
argNames.length > 0 ? '\t\targNames: [ "' + argNames.join('", "') + '" ],\n' : '',
'\t\t},\n'
].join(''));
mapperContent.push([
'\t\t' + methodName + ': {\n',
argNames.length > 0 ? '\t\targNames: [ "' + argNames.join('", "') + '" ],\n' : '',
methodName == "delete" ? '\t\trequestType: RequestType.Delete\n' : '',
'\t\t},\n'
].join(''));
mapperMethods.push({
name: methodName,
def: [
'\t\t' + methodName + ': IMapperMethod & {\n',
argNames.length > 0 ? '\t\targNames: [ "' + argNames.join('", "') + '" ],\n' : '',
'\t\t},\n'
].join(''),
method: [
'\t\t' + methodName + ': {\n',
argNames.length > 0 ? '\t\targNames: [ "' + argNames.join('", "') + '" ],\n' : '',
methodName == "delete" ? '\t\trequestType: RequestType.Delete\n' : '',
'\t\t},\n'
].join('')
});
}
// Sort the methods
mapperMethods = mapperMethods.sort((a, b) => {
if (a.name < b.name) { return -1; }
if (a.name > b.name) { return 1; }
return 0;
});
// Parse the methods
for (let i = 0; i < mapperMethods.length; i++) {
mapperDef.push(mapperMethods[i].def);
mapperContent.push(mapperMethods[i].method);
}
// Add the closing tag

@@ -863,0 +884,0 @@ mapperDef.push('\t}\n');

{
"name": "gd-sprest-def",
"version": "0.5.5",
"version": "0.5.6",
"description": "TypeScript definition files generated from the $metadata REST endpoint in SharePoint.",

@@ -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