graphql-codegen-modules-gen
Advanced tools
Comparing version 1.6.1 to 1.7.0
{ | ||
"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", |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30893
790