@trackunit/react-graphql-tools 0.0.95 → 0.0.97
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
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.97](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.96...react-graphql-tools/0.0.97) (2024-11-28)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `test-setup` updated to version `0.0.96`
|
|
10
|
+
## [0.0.96](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.95...react-graphql-tools/0.0.96) (2024-11-11)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **react-graphql-tools:** add codegen.ts to tsconfig.spec in add-graphql generator ([ee80eac](https://github.com/Trackunit/manager/commit/ee80eac2eb6fca31b5b9f00fafb77944cb098a5e))
|
|
16
|
+
* test ([e904b58](https://github.com/Trackunit/manager/commit/e904b58d10c5d212a5dd2e848614601cdf3f79b5))
|
|
17
|
+
|
|
5
18
|
## [0.0.95](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.94...react-graphql-tools/0.0.95) (2024-11-05)
|
|
6
19
|
|
|
7
20
|
## [0.0.94](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.93...react-graphql-tools/0.0.94) (2024-10-29)
|
package/package.json
CHANGED
|
@@ -33,6 +33,14 @@ async function addGraphqlGenerator(tree, options) {
|
|
|
33
33
|
};
|
|
34
34
|
return projectJSON;
|
|
35
35
|
});
|
|
36
|
+
if (tree.exists(`${libraryRoot}/tsconfig.spec.json`)) {
|
|
37
|
+
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(libraryRoot, "tsconfig.spec.json"), json => {
|
|
38
|
+
if (!json.include.includes("codegen.ts")) {
|
|
39
|
+
json.include = [...json.include, "codegen.ts"];
|
|
40
|
+
}
|
|
41
|
+
return json;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
36
44
|
await (0, devkit_1.formatFiles)(tree);
|
|
37
45
|
}
|
|
38
46
|
exports.default = addGraphqlGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/generators/add-graphql/generator.ts"],"names":[],"mappings":";;AAQA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/generators/add-graphql/generator.ts"],"names":[],"mappings":";;AAQA,kDAsCC;;AA9CD,+BAA+B;AAC/B,uCAAuH;AACvH,mDAA6B;AAG7B;;GAEG;AACI,KAAK,UAAU,mBAAmB,CAAC,IAAU,EAAE,OAAkC;IACtF,MAAM,aAAa,GAAG,EAAE,CAAC;IACzB,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC;IACvC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC7E,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CACT,2KAA2K,CAC5K,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,aAAa,CAAC,EAAE,CAAC;QAC9C,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,gCAAgC,WAAW,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,IAAA,mBAAU,EAAC,IAAI,EAAE,IAAA,0BAAiB,EAAC,WAAW,EAAE,cAAc,CAAC,EAAE,WAAW,CAAC,EAAE;QAC7E,WAAW,CAAC,OAAO,GAAG;YACpB,GAAG,WAAW,CAAC,OAAO;YACtB,eAAe,EAAE;gBACf,QAAQ,EAAE,4CAA4C;aACvD;SACF,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,qBAAqB,CAAC,EAAE,CAAC;QACrD,IAAA,mBAAU,EAAC,IAAI,EAAE,IAAA,0BAAiB,EAAC,WAAW,EAAE,oBAAoB,CAAC,EAAE,IAAI,CAAC,EAAE;YAC5E,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;gBACzC,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YACjD,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;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 { AddGraphqlGeneratorSchema } from \"./schema\";\n\n/**\n * Setting up Graphql tools for Iris App development\n */\nexport async function addGraphqlGenerator(tree: Tree, options: AddGraphqlGeneratorSchema) {\n const workspaceRoot = \"\";\n const projectConfig = readProjectConfiguration(tree, options.project);\n const libraryRoot = projectConfig.root;\n if (!tree.exists(\"graphql.config.json\") && !tree.exists(\"graphql.config.ts\")) {\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\n if (tree.exists(`${libraryRoot}/tsconfig.spec.json`)) {\n updateJson(tree, joinPathFragments(libraryRoot, \"tsconfig.spec.json\"), json => {\n if (!json.include.includes(\"codegen.ts\")) {\n json.include = [...json.include, \"codegen.ts\"];\n }\n return json;\n });\n }\n\n await formatFiles(tree);\n}\n\nexport default addGraphqlGenerator;\n"]}
|