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

graphql-codegen-modules-gen

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-codegen-modules-gen - npm Package Compare versions

Comparing version 1.7.0 to 1.8.0

2

package.json
{
"name": "graphql-codegen-modules-gen",
"version": "1.7.0",
"version": "1.8.0",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

@@ -132,17 +132,14 @@ import {

const list = enums[key];
let keyWOEnum = key.replace("Enum", "");
let enumFileData = `import { ${key} } from '$graphql/_gen/clientTypes';
export function getList${key}() {
\tlet items: { key: ${key}; value: string }[] = [];
export const ${keyWOEnum}List: Record<string, ${key}> = {
\t${list
.map((c) => {
return `items.push({ key: ${key}.${toPascalCase(
return `'${toPascalCase(c.toLowerCase())}' : ${key}.${toPascalCase(
c.toLowerCase()
)}, value: '${toPascalCase(c.toLowerCase())}' });`;
)},`;
})
.join("\n\t")}
\treturn items;
}
.join("\n\t")}
};
`;

@@ -155,6 +152,8 @@ // Write this file only if it doesn't exist!

if (
!existsSync(join(modulePath, "_enums", "ui", "lists", `List${key}.ts`))
!existsSync(
join(modulePath, "_enums", "ui", "lists", `${keyWOEnum}List.ts`)
)
) {
writeFileSync(
join(modulePath, "_enums", "ui", "lists", `List${key}.ts`),
join(modulePath, "_enums", "ui", "lists", `${keyWOEnum}List.ts`),
enumFileData

@@ -161,0 +160,0 @@ );

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