@trackunit/react-graphql-tools 0.0.68 → 0.0.70
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 +4 -0
- package/generators.json +5 -5
- package/package.json +1 -1
- package/src/generators/{add-grapqhl → add-graphql}/generator.js +5 -5
- package/src/generators/add-graphql/generator.js.map +1 -0
- package/src/generators/add-graphql/schema.d.ts +3 -0
- package/src/generators/add-grapqhl/generator.js.map +0 -1
- package/src/generators/add-grapqhl/schema.d.ts +0 -3
- /package/src/generators/{add-grapqhl → add-graphql}/files/root/graphql.config.json.template +0 -0
- /package/src/generators/{add-grapqhl → add-graphql}/files/subDirectory/codegen.ts.template +0 -0
- /package/src/generators/{add-grapqhl → add-graphql}/schema.json +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.70](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.69...react-graphql-tools/0.0.70) (2024-02-07)
|
|
6
|
+
|
|
7
|
+
## [0.0.69](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.68...react-graphql-tools/0.0.69) (2024-02-05)
|
|
8
|
+
|
|
5
9
|
## [0.0.68](https://github.com/Trackunit/manager/compare/react-graphql-tools/0.0.67...react-graphql-tools/0.0.68) (2024-02-05)
|
|
6
10
|
|
|
7
11
|
### Dependency Updates
|
package/generators.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
-
"add-
|
|
4
|
-
"factory": "./src/generators/add-
|
|
5
|
-
"schema": "./src/generators/add-
|
|
6
|
-
"description": "add-
|
|
3
|
+
"add-graphql": {
|
|
4
|
+
"factory": "./src/generators/add-graphql/generator",
|
|
5
|
+
"schema": "./src/generators/add-graphql/schema.json",
|
|
6
|
+
"description": "add-graphql generator"
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
}
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.addGraphqlGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* eslint-disable no-console */
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -8,12 +8,12 @@ const path = tslib_1.__importStar(require("path"));
|
|
|
8
8
|
/**
|
|
9
9
|
* Setting up Graphql tools for Iris App development
|
|
10
10
|
*/
|
|
11
|
-
function
|
|
11
|
+
function addGraphqlGenerator(tree, options) {
|
|
12
12
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
13
|
const workspaceRoot = "";
|
|
14
14
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
15
15
|
const libraryRoot = projectConfig.root;
|
|
16
|
-
if (!tree.exists("graphql.config.json")) {
|
|
16
|
+
if (!tree.exists("graphql.config.json") && !tree.exists("graphql.config.ts")) {
|
|
17
17
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, "files", "root"), workspaceRoot, options);
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
@@ -34,6 +34,6 @@ function addGrapqhlGenerator(tree, options) {
|
|
|
34
34
|
yield (0, devkit_1.formatFiles)(tree);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
exports.
|
|
38
|
-
exports.default =
|
|
37
|
+
exports.addGraphqlGenerator = addGraphqlGenerator;
|
|
38
|
+
exports.default = addGraphqlGenerator;
|
|
39
39
|
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/generators/add-graphql/generator.ts"],"names":[],"mappings":";;;;AAAA,+B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AAmB,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 await formatFiles(tree);\n}\n\nexport default addGraphqlGenerator;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|