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.6.1 to 1.7.0

5

package.json
{
"name": "graphql-codegen-modules-gen",
"version": "1.6.1",
"version": "1.7.0",
"description": "",
"scripts": {
"test": "node ./src/cli ../sveltekit-yoga/packages/main/src/lib/modules",
"test": "node ./src/cli ../my-minion-mr/packages/main/src/lib/modules",
"test2": "node ./src/cli ../sveltekit-yoga/packages/main/src/lib/modules",
"build": "rollup --config ./rollup.config.js",

@@ -8,0 +9,0 @@ "pack": "yarn pack",

31

src/graphql-codegen-modules-gen.js

@@ -118,4 +118,5 @@ import {

let enumFileData = `enum ${key} {
${list.join("\n ")}
}`;
\t${list.join("\n\t")}
}
`;
writeFileSync(

@@ -132,16 +133,16 @@ join(modulePath, "_enums", "typedefs", `ENUM.${key}.graphql`),

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

@@ -171,3 +172,3 @@ `;

id: 'enums-module',
typeDefs,
typeDefs
});

@@ -358,3 +359,3 @@ `

dataAppModules.push(
`import { ${moduleName}Module } from '$lib/modules/${moduleName}';`
`import { ${moduleName}Module } from '$modules/${moduleName}';`
);

@@ -393,3 +394,3 @@ });

urqlCache.urqlCacheName
)} } from '$lib/modules/${
)} } from '$modules/${
urqlCache.moduleName

@@ -396,0 +397,0 @@ }/providers/_urqlCache${toPascalCase(urqlCache.urqlCacheName)}';`

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