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.4.6 to 0.4.7

13

base.d.ts

@@ -120,2 +120,15 @@ /**

/**
* Mapper
*/
export interface IMapper {
data?: any;
inheritMetadataType?: boolean;
metadataType?: any;
replaceEndpointFl?: boolean;
requestType?: number;
requestMethod?: string;
returnType?: string;
}
/**
* Method Information Settings

@@ -122,0 +135,0 @@ */

@@ -120,2 +120,15 @@ /**

/**
* Mapper
*/
export interface IMapper {
data?: any;
inheritMetadataType?: boolean;
metadataType?: any;
replaceEndpointFl?: boolean;
requestType?: number;
requestMethod?: string;
returnType?: string;
}
/**
* Method Information Settings

@@ -122,0 +135,0 @@ */

64

main.js

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

// Directory -> File
let mapper = {};
for (let dirName in directories) {

@@ -462,3 +463,2 @@ let api = [];

let filesIndex = [];
let mapper = {};

@@ -799,44 +799,44 @@ // Set the path

}
}
// Parse the mapper
let mapperContent = [];
for (let mapperKey in mapper) {
let methods = [];
// Parse the mapper
let mapperContent = [];
for (let mapperKey in mapper) {
let methods = [];
// Add the header
methods.push('\/* ' + mapperKey + ' *\/');
methods.push('export interface ' + mapperKey + ' {');
// Add the header
methods.push('\/* ' + mapperKey + ' *\/');
methods.push('export interface ' + mapperKey + ' {');
// Parse the methods
for (let i = 0; i < mapper[mapperKey].length; i++) {
let argNames = [];
let methodInfo = mapper[mapperKey][i];
// Parse the methods
for (let i = 0; i < mapper[mapperKey].length; i++) {
let argNames = [];
let methodInfo = mapper[mapperKey][i];
// Parse the parameters
for (let j = 0; j < methodInfo.params.length; j++) {
let param = methodInfo.params[j];
// Parse the parameters
for (let j = 0; j < methodInfo.params.length; j++) {
let param = methodInfo.params[j];
// Append the argument
argNames.push(param.$.Name);
}
// Add the method
methods.push([
'\t' + methodInfo.name + ': { ',
argNames.length > 0 ? '\t\targNames: [ "' + argNames.join('", "') + '" ],' : '',
'\t},'
].join('\n'));
// Append the argument
argNames.push(param.$.Name);
}
// Add the closing tag
methods.push('};\n');
// Generate the interface
mapperContent.push(methods.join('\n'));
// Add the method
methods.push([
'\t' + methodInfo.name + ': { ',
argNames.length > 0 ? '\t\targNames: IMapper & [ "' + argNames.join('", "') + '" ],' : '',
'\t},'
].join('\n'));
}
// Create the index file
fs.appendFileSync('lib/mapper.ts', '\n' + mapperContent.join('\n'));
// Add the closing tag
methods.push('};\n');
// Generate the interface
mapperContent.push(methods.join('\n'));
}
// Create the index file
fs.appendFileSync('lib/mapper.ts', 'import { IMapper } from "./base";\n\n' + mapperContent.join('\n'));
// Log

@@ -843,0 +843,0 @@ console.log("Library generated in './lib'");

{
"name": "gd-sprest-def",
"version": "0.4.6",
"version": "0.4.7",
"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

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