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

plexiform-build-apicmds

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plexiform-build-apicmds - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

0

.eslintrc.json

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ # MyProject

2

index.js

@@ -12,3 +12,3 @@ /* jshint esversion: 6, laxcomma: true */

name: "plexiform-build-apicmds",
version: "0.1.0",
version: "0.2.0",
author: "Raith"

@@ -15,0 +15,0 @@ };

{
"name": "plexiform-build-apicmds",
"version": "0.1.0",
"version": "0.2.0",
"description": "A plexiform build script for generating a class library of Commands implementations for a back-end api",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -0,0 +0,0 @@ # plexiform-build-apicmds

@@ -6,9 +6,2 @@ // jshint esversion: 6

function buildClassCommand (com) {
var cs = "";
cs += `\n\t\tpublic ${com.name}ResponsePayload ${com.name} (${com.name}RequestPayload payload)`;
cs += `{\n\t\t\treturn null;\n\t\t}`;
return cs;
}
return `${u.header()}

@@ -24,5 +17,26 @@

public class Commands : ICommands {
${
(x.commands || []).map(buildClassCommand).join("\n")
${ (x.commands || []).map(com => `
public ${com.name}ResponsePayload ${com.name} (${com.name}RequestPayload payload)
{
/* REQUEST payload
${(com.request_params || []).map(p => `${u.paramIsObject(p) ? p.type : c.types[p.type].cs} ${p.name}`).join('\n\t\t\t\t') }
*/
var response = new ${com.name}ResponsePayload();
/* RESPONSE payload
${(com.response_params || []).map(p => `${u.paramIsObject(p) ? p.type : c.types[p.type].cs} ${p.name}`).join('\n\t\t\t\t') }
*/
using (var db = new ${c.namespaces.data || c.namespaces.entity}.${c.application.name}DbContext()) {
// CRUD for all entities
${c.entities ? c.entities.map(e => `var crud${e.name} = new Crudus<${e.name}>(db);`).join('\n\t\t\t\t') : ''}
// Implement your business logic and data manipulation here
Console.WriteLine("CMD: plugin implementation of ${com.name}");
}
return response;
}
`).join("\n") }
}

@@ -29,0 +43,0 @@ }

@@ -10,3 +10,3 @@ // jshint esversion: 6

<ItemGroup>
<ProjectReference Include="..\\${c.application.name}\\${c.application.name}.csproj" />
<ProjectReference Include="..\\${c.application.name}Service\\${c.application.name}Service.csproj" />
</ItemGroup>

@@ -13,0 +13,0 @@

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