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

bridge-compile

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bridge-compile - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

2

dist/parser/find-source-file.js

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

if (matches && matches?.length > 1 && matches[1].includes('routes')) {
console.log(matches[1]);
// console.log(matches[1]);
addedCode = `\nconst bridgeGeneratedVariable = initBridge(${matches[1]});\ntype BridgeGenereatedType = typeof bridgeGeneratedVariable['bridgeType'];\n`;

@@ -29,0 +29,0 @@ await fs_1.default.promises.appendFile(absolute, addedCode, 'utf-8');

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

else {
console.log(returnVal);
// console.log(returnVal);
// if the handlers returns void, Bridge returns an empty object instead

@@ -64,0 +64,0 @@ if ('primitive' in returnVal && returnVal.primitive === 'void')

@@ -16,7 +16,5 @@ "use strict";

if (typeString === 'ObjectId') {
console.log(typeString);
return { primitive: 'string' };
}
if (typeString.endsWith('?'))
console.log(typeString);
// if (typeString.endsWith('?')) console.log(typeString);
// Depth 3 is the depth of the return

@@ -23,0 +21,0 @@ if (depth === 7 && (0, recursive_checker_1.isTypeDepthGreaterThan)(checker, type, node, 45))

@@ -22,12 +22,14 @@ "use strict";

return '(' + JSONType.union.map((elem) => (0, exports.JSONTypeToTSInterface)(elem)).join(' | ') + ')';
if ('intersection' in JSONType)
if ('intersection' in JSONType && JSONType.intersection.length > 0)
return '(' + JSONType.intersection.map((elem) => (0, exports.JSONTypeToTSInterface)(elem)).join(' & ') + ')';
if ('arrayWithPos' in JSONType)
return '[' + JSONType.arrayWithPos.map((elem) => (0, exports.JSONTypeToTSInterface)(elem)).join(', ') + ']';
return ('{' +
Object.entries(JSONType.object)
.map(([key, value]) => `${key}${value.optional ? '?' : ''}: ${(0, exports.JSONTypeToTSInterface)(value)}`)
.join(';') +
'}');
else if ('object' in JSONType)
return ('{' +
Object.entries(JSONType.object)
.map(([key, value]) => `${key}${value.optional ? '?' : ''}: ${(0, exports.JSONTypeToTSInterface)(value)}`)
.join(';') +
'}');
return 'any';
};
exports.JSONTypeToTSInterface = JSONTypeToTSInterface;
{
"name": "bridge-compile",
"version": "1.0.10",
"version": "1.0.11",
"description": "Compile the sdk of your Bridge project with one command locally",

@@ -5,0 +5,0 @@ "author": "Bridge Team <support@bridge.codes>",

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