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

@compas/code-gen

Package Overview
Dependencies
Maintainers
1
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compas/code-gen - npm Package Compare versions

Comparing version 0.0.134 to 0.0.135

8

package.json
{
"name": "@compas/code-gen",
"version": "0.0.134",
"version": "0.0.135",
"description": "Generate various boring parts of your server",

@@ -18,4 +18,4 @@ "main": "./index.js",

"dependencies": {
"@compas/cli": "0.0.134",
"@compas/stdlib": "0.0.134"
"@compas/cli": "0.0.135",
"@compas/stdlib": "0.0.135"
},

@@ -43,3 +43,3 @@ "maintainers": [

},
"gitHead": "64810914b304fdf3466b64b40a001ee481c47980"
"gitHead": "82a88d24e5ae2b9e092be1d33101abf37bbc20d6"
}

@@ -34,8 +34,3 @@ import { dirnameForModule, isNil, pathJoin } from "@compas/stdlib";

const contents = executeTemplate("routerGroupFile", {
routeTrie,
routeTags,
extension: context.extension,
importExtension: context.extension,
groupStructure,
options: context.options,
groupName: group,

@@ -42,0 +37,0 @@ });

@@ -13,5 +13,8 @@ const RoutePrio = {

if (item.type === "route") {
const fullPath = item.path.endsWith("/")
? `${item.path}${item.method}`
: `${item.path}/${item.method}`;
routeTrieInput.push({
uniqueName: item.uniqueName,
fullPath: `${item.method}/${item.path}`,
fullPath,
});

@@ -30,3 +33,2 @@ }

const trie = createNode("");
addHttpMethods(trie);

@@ -41,12 +43,4 @@ for (const r of input) {

// Don't collapse top level
for (const child of trie.children) {
cleanTrieAndCollapse(child);
}
cleanTrieAndCollapse(trie);
// Remove unneeded 'HTTP-method' children
trie.children = trie.children.filter(
(it) => it.children.length > 0 || it.uniqueName !== undefined,
);
sortTrie(trie);

@@ -114,17 +108,2 @@

* @param trie
*/
function addHttpMethods(trie) {
addChildNodes(
trie,
createNode("GET"),
createNode("POST"),
createNode("PUT"),
createNode("PATCH"),
createNode("DELETE"),
createNode("HEAD"),
);
}
/**
* @param trie
* @param path

@@ -131,0 +110,0 @@ * @param uniqueName

@@ -444,4 +444,4 @@ import { isNil } from "@compas/stdlib";

"(SELECT value::${sqlCastType} FROM(values (",
...builder.where.${ownKey}In.map(
() => "").join("), ("),
...Array.from({ length: builder.where.${ownKey}In.length - 1 }).map(
() => "), ("),
")) as ids(value)) INTERSECT "

@@ -448,0 +448,0 @@ ], ...builder.where.${ownKey}In)

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