New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vstack-typescript-generator

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vstack-typescript-generator - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

15

dist/src/index.js

@@ -28,3 +28,3 @@ 'use strict';

var result = results.join('\n\n');
if (result && options && options.baseNamespace) {
if (result && options && options.moduleName) {
var indentedResult = result

@@ -34,3 +34,3 @@ .split('\n')

.join('\n');
result = "module " + options.baseNamespace + " {\n" + indentedResult + "\n}";
result = "module " + options.moduleName + " {\n" + indentedResult + "\n}";
}

@@ -43,3 +43,2 @@ return result;

'use strict';
var modifier = options && options.baseNamespace ? 'export' : 'declare';
var nextIndex = 0;

@@ -52,3 +51,3 @@ var entryStrings = [];

}
return modifier + " enum " + cSharpEnum.name + " {\n " + entryStrings.join(',\n ') + "\n}";
return "export enum " + cSharpEnum.name + " {\n " + entryStrings.join(',\n ') + "\n}";
}

@@ -59,3 +58,2 @@ function generateInterface(type, options) {

var ignoreInhertitance = options && options.ignoreInheritance && options.ignoreInheritance.indexOf(type.inherits) !== -1;
var modifier = options && options.baseNamespace ? 'export ' : '';
var tsInterfaceName = prefixWithI ? "I" + type.name : type.name;

@@ -76,10 +74,9 @@ var tsExtends = type.inherits && !ignoreInhertitance ? " extends " + type.inherits : '';

}
return modifier + "interface " + tsInterfaceName + tsExtends + " {\n " + propertyStrings.join(';\n ') + ";\n}";
return "export interface " + tsInterfaceName + tsExtends + " {\n " + propertyStrings.join(';\n ') + ";\n}";
}
function generatePrimaryFilter(type, options) {
'use strict';
var modifier = options && options.baseNamespace ? 'export ' : '';
var domainType = type.inherits.match(primaryDtoFilterRegex)[1];
var filterGroup = pluralize(domainType);
var filterType = options && options.dtoNamespace ? options.dtoNamespace + "." + domainType : domainType;
var filterType = options && options.dtoModuleName ? options.dtoModuleName + "." + domainType : domainType;
var tsConstructorParameters = [];

@@ -123,3 +120,3 @@ var filterParameters = [];

var result = '';
result += modifier + "class " + filterGroup + type.name + "Filter implements IPrimaryFilter<" + filterType + "> {\n";
result += "export class " + filterGroup + type.name + "Filter implements IPrimaryFilter<" + filterType + "> {\n";
result += " constructor(" + tsConstructorParameters.join(', ') + ") {\n";

@@ -126,0 +123,0 @@ result += " }\n\n";

4

dist/src/options.d.ts
export interface Options {
baseNamespace?: string;
moduleName?: string;
prefixWithI?: boolean;

@@ -7,3 +7,3 @@ dateTimeToDate?: boolean;

propertyNameResolver?: (prop: string) => string;
dtoNamespace?: string;
dtoModuleName?: string;
}

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

}
else if (['int', 'short', 'decimal', 'double', 'float', 'Int32', 'Int64'].indexOf(csType) !== -1) {
else if (['int', 'short', 'decimal', 'double', 'float', 'byte', 'Int32', 'Int64', 'Byte'].indexOf(csType) !== -1) {
return 'number';

@@ -18,0 +18,0 @@ }

{
"name": "vstack-typescript-generator",
"version": "0.1.4",
"version": "0.1.5",
"description": "",

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

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