@trackunit/react-graphql-tools 0.0.64 → 0.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/generators.json +9 -0
- package/package.json +2 -1
- package/src/executors/createHooks/scrubFile.js +2 -2
- package/src/executors/createHooks/scrubFile.js.map +1 -1
- package/src/generators/add-grapqhl/files/root/graphql.config.json.template +3 -0
- package/src/generators/add-grapqhl/files/subDirectory/codegen.ts.template +7 -0
- package/src/generators/add-grapqhl/generator.js +39 -0
- package/src/generators/add-grapqhl/generator.js.map +1 -0
- package/src/generators/add-grapqhl/schema.d.ts +3 -0
- package/src/generators/add-grapqhl/schema.json +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.67](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.66...react-graphql-tools/0.0.67) (2024-01-24)
|
|
6
|
+
|
|
7
|
+
## [0.0.66](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.65...react-graphql-tools/0.0.66) (2024-01-24)
|
|
8
|
+
|
|
9
|
+
## [0.0.65](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.64...react-graphql-tools/0.0.65) (2024-01-19)
|
|
10
|
+
|
|
5
11
|
## [0.0.64](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.63...react-graphql-tools/0.0.64) (2024-01-17)
|
|
6
12
|
|
|
7
13
|
### Dependency Updates
|
package/generators.json
ADDED
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-graphql-tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"executors": "./executors.json",
|
|
6
|
+
"generators": "./generators.json",
|
|
6
7
|
"repository": "https://github.com/Trackunit/manager",
|
|
7
8
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
8
9
|
"engines": {
|
|
@@ -99,8 +99,8 @@ const scrubFile = (file, nxRoot, isVerbose) => tslib_1.__awaiter(void 0, void 0,
|
|
|
99
99
|
console.error("Error in prettier.format:", error);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
const parentDir =
|
|
103
|
-
(0, fs_1.writeFileSync)(parentDir
|
|
102
|
+
const parentDir = (0, path_1.dirname)(file);
|
|
103
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(parentDir, "mock.ts"), prettyMockSrc, { encoding: "utf-8" });
|
|
104
104
|
return prettySrc;
|
|
105
105
|
});
|
|
106
106
|
exports.scrubFile = scrubFile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrubFile.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/executors/createHooks/scrubFile.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,2BAAiD;AACjD,+
|
|
1
|
+
{"version":3,"file":"scrubFile.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/executors/createHooks/scrubFile.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,2BAAiD;AACjD,+BAAqC;AACrC,2DAAqC;AACrC,mDAAuD;AACvD,mCAAoG;AAEpG;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAO,WAAmB,EAAE,MAAc,EAAE,SAAmB,EAAE,EAAE;IACjG,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAEnC,MAAM,UAAU,GAAG,IAAA,wBAAgB,EAAC,WAAW,CAAC,CAAC;IAEjD,IAAI,iBAAiB,GAAG,EAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,UAAU,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC9D,WAAW,CAAC,gBAAgB,EAAE,C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O,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;SACnD;KACF;IACD,MAAM,SAAS,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,CAAC;IAChC,IAAA,kBAAa,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,SAAS,CAAC,EAAE,aAAa,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;IAChF,OAAO,SAAS,CAAC;AACnB,CAAC,CAAA,CAAC;AAjDW,QAAA,SAAS,aAiDpB","sourcesContent":["/* eslint-disable no-console */\nimport { readFileSync, writeFileSync } from \"fs\";\nimport { dirname, join } from \"path\";\nimport * as prettier from \"prettier\";\nimport { scrubMockFileContent } from \"./scrubMockFile\";\nimport { convertEnumToConstObject, createSourceFile, getPreservedTypes, isFragment } from \"./utils\";\n\n/**\n * Generates React hooks from your graphql files.\n */\nexport const scrubFileContent = async (fileContent: string, nxRoot: string, isVerbose?: boolean) => {\n const start = new Date().getTime();\n\n const sourceFile = createSourceFile(fileContent);\n\n let resultFileContent = \"\";\n const scalarsType = sourceFile.getTypeAliasOrThrow(\"Scalars\");\n scalarsType.getEndLineNumber();\n resultFileContent += fileContent.split(\"\\n\").slice(0, scalarsType.getEndLineNumber()).join(\"\\n\") + \"\\n\";\n const alreadyAdded = sourceFile\n .getTypeAliases()\n .filter(typeAlias => typeAlias.getStartLineNumber() < scalarsType.getEndLineNumber())\n .map(typeAlias => typeAlias.getName());\n\n resultFileContent = resultFileContent.replace(\n \"export type InputMaybe<T> = Maybe<T>;\",\n \"export type InputMaybe<T> = Maybe<T> | undefined;\"\n );\n\n const { preservedTypes, queryAndMutations } = getPreservedTypes(sourceFile, isVerbose);\n isVerbose && console.log(\"PreservedTypes:\", preservedTypes);\n\n sourceFile.getEnums().forEach(enumType => {\n const typeName = enumType.getName();\n if (preservedTypes.includes(typeName) && !alreadyAdded.includes(typeName) && !isFragment(typeName)) {\n alreadyAdded.push(typeName);\n resultFileContent += \"\\n\" + convertEnumToConstObject(enumType) + \"\\n\";\n }\n });\n sourceFile.getTypeAliases().forEach(typeAlias => {\n const typeName = typeAlias.getName();\n if (preservedTypes.includes(typeName) && !alreadyAdded.includes(typeName) && !isFragment(typeName)) {\n alreadyAdded.push(typeName);\n resultFileContent += \"\\n\" + typeAlias.getText() + \"\\n\";\n }\n });\n\n const resultQueryAndMutations = queryAndMutations.map(queryOrMutation => queryOrMutation.getFullText()).join(\"\\n\");\n\n const result = resultFileContent + \"\\n\" + resultQueryAndMutations;\n if (isVerbose) {\n const end = new Date().getTime();\n const time = end - start;\n console.log(\"Execution time: \" + time);\n }\n\n return result;\n};\n\n/**\n * Scrubs the file content.\n *\n * @param file The file to scrub.\n */\nexport const scrubFile = async (file: string, nxRoot: string, isVerbose?: boolean) => {\n const fileContent = readFileSync(file, { encoding: \"utf-8\" });\n if (fileContent.length === 0) {\n console.warn(`File ${file} is empty`);\n }\n const scrubbedMockFileContent = await scrubMockFileContent(fileContent, nxRoot, isVerbose);\n\n const scrubbedFileContent = await scrubFileContent(fileContent, nxRoot, isVerbose);\n\n let options = null;\n try {\n options = prettier\n .resolveConfig(join(nxRoot, \".prettierrc\"), {\n useCache: false,\n editorconfig: false,\n config: join(nxRoot, \".prettierrc\"),\n })\n .catch((error: Error) => console.log(error));\n } catch (e) {\n console.log(e);\n }\n if (!options) {\n throw new Error(\"Could not find prettier config\");\n }\n const prettierOptions = await options;\n\n let prettySrc = scrubbedFileContent;\n if (prettierOptions) {\n prettierOptions.parser = \"typescript\";\n try {\n prettySrc = await prettier.format(scrubbedFileContent, prettierOptions);\n } catch (error) {\n console.error(\"Error in prettier.format:\", error);\n }\n }\n writeFileSync(file, prettySrc, { encoding: \"utf-8\" });\n\n let prettyMockSrc = scrubbedMockFileContent;\n if (prettierOptions) {\n prettierOptions.parser = \"typescript\";\n try {\n prettyMockSrc = await prettier.format(scrubbedMockFileContent, prettierOptions);\n } catch (error) {\n console.error(\"Error in prettier.format:\", error);\n }\n }\n const parentDir = dirname(file);\n writeFileSync(join(parentDir, \"mock.ts\"), prettyMockSrc, { encoding: \"utf-8\" });\n return prettySrc;\n};"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addGrapqhlGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/* eslint-disable no-console */
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
const path = tslib_1.__importStar(require("path"));
|
|
8
|
+
/**
|
|
9
|
+
* Setting up Graphql tools for Iris App development
|
|
10
|
+
*/
|
|
11
|
+
function addGrapqhlGenerator(tree, options) {
|
|
12
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
const workspaceRoot = "";
|
|
14
|
+
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
15
|
+
const libraryRoot = projectConfig.root;
|
|
16
|
+
if (!tree.exists("graphql.config.json")) {
|
|
17
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, "files", "root"), workspaceRoot, options);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
console.log(`"graphql.config.json" already exist in your workspace root. \nPlease ensure that your "graphql.config.json" contains "schema": "https://iris.trackunit.com/api/graphql/".`);
|
|
21
|
+
}
|
|
22
|
+
if (!tree.exists(`${libraryRoot}/codegen.ts`)) {
|
|
23
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, "files", "subDirectory"), libraryRoot, options);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
console.log(`codegen.ts already exists in ${libraryRoot}`);
|
|
27
|
+
}
|
|
28
|
+
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(libraryRoot, "project.json"), projectJSON => {
|
|
29
|
+
projectJSON.targets = Object.assign(Object.assign({}, projectJSON.targets), { "graphql-hooks": {
|
|
30
|
+
executor: "@trackunit/react-graphql-tools:createHooks",
|
|
31
|
+
} });
|
|
32
|
+
return projectJSON;
|
|
33
|
+
});
|
|
34
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
exports.addGrapqhlGenerator = addGrapqhlGenerator;
|
|
38
|
+
exports.default = addGrapqhlGenerator;
|
|
39
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/generators/add-grapqhl/generator.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,uCAAuH;AACvH,mDAA6B;AAG7B;;GAEG;AACH,SAAsB,mBAAmB,CAAC,IAAU,EAAE,OAAkC;;QACtF,MAAM,aAAa,GAAG,EAAE,CAAC;QACzB,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACtE,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,EAAE;YACvC,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;SACpF;aAAM;YACL,OAAO,CAAC,GAAG,CACT,2KAA2K,CAC5K,CAAC;SACH;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,aAAa,CAAC,EAAE;YAC7C,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;SAC1F;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,gCAAgC,WAAW,EAAE,CAAC,CAAC;SAC5D;QAED,IAAA,mBAAU,EAAC,IAAI,EAAE,IAAA,0BAAiB,EAAC,WAAW,EAAE,cAAc,CAAC,EAAE,WAAW,CAAC,EAAE;YAC7E,WAAW,CAAC,OAAO,mCACd,WAAW,CAAC,OAAO,KACtB,eAAe,EAAE;oBACf,QAAQ,EAAE,4CAA4C;iBACvD,GACF,CAAC;YACF,OAAO,WAAW,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AA5BD,kDA4BC;AAED,kBAAe,mBAAmB,CAAC","sourcesContent":["/* eslint-disable no-console */\nimport { formatFiles, generateFiles, joinPathFragments, readProjectConfiguration, Tree, updateJson } from \"@nx/devkit\";\nimport * as path from \"path\";\nimport { AddGrapqhlGeneratorSchema } from \"./schema\";\n\n/**\n * Setting up Graphql tools for Iris App development\n */\nexport async function addGrapqhlGenerator(tree: Tree, options: AddGrapqhlGeneratorSchema) {\n const workspaceRoot = \"\";\n const projectConfig = readProjectConfiguration(tree, options.project);\n const libraryRoot = projectConfig.root;\n if (!tree.exists(\"graphql.config.json\")) {\n generateFiles(tree, path.join(__dirname, \"files\", \"root\"), workspaceRoot, options);\n } else {\n console.log(\n `\"graphql.config.json\" already exist in your workspace root. \\nPlease ensure that your \"graphql.config.json\" contains \"schema\": \"https://iris.trackunit.com/api/graphql/\".`\n );\n }\n\n if (!tree.exists(`${libraryRoot}/codegen.ts`)) {\n generateFiles(tree, path.join(__dirname, \"files\", \"subDirectory\"), libraryRoot, options);\n } else {\n console.log(`codegen.ts already exists in ${libraryRoot}`);\n }\n\n updateJson(tree, joinPathFragments(libraryRoot, \"project.json\"), projectJSON => {\n projectJSON.targets = {\n ...projectJSON.targets,\n \"graphql-hooks\": {\n executor: \"@trackunit/react-graphql-tools:createHooks\",\n },\n };\n return projectJSON;\n });\n await formatFiles(tree);\n}\n\nexport default addGrapqhlGenerator;\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "AddGrapqhl",
|
|
4
|
+
"title": "",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"project": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "",
|
|
10
|
+
"$default": {
|
|
11
|
+
"$source": "argv",
|
|
12
|
+
"index": 0
|
|
13
|
+
},
|
|
14
|
+
"x-prompt": "What library should we add graphql to?",
|
|
15
|
+
"x-dropdown": "projects"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"project"
|
|
20
|
+
]
|
|
21
|
+
}
|