@trackunit/react-graphql-tools 1.14.85-alpha-288640a1f26.0 → 1.14.85
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-graphql-tools",
|
|
3
|
-
"version": "1.14.85
|
|
3
|
+
"version": "1.14.85",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"executors": "./executors.json",
|
|
6
6
|
"generators": "./generators.json",
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"@faker-js/faker": "^8.4.1",
|
|
18
18
|
"win-ca": "^3.5.1",
|
|
19
19
|
"tslib": "^2.6.2",
|
|
20
|
-
"@nx/devkit": "
|
|
21
|
-
"@nx/js": "23.1.0"
|
|
20
|
+
"@nx/devkit": "22.7.5"
|
|
22
21
|
},
|
|
23
22
|
"migrations": "./migrations.json",
|
|
24
23
|
"types": "./src/index.d.ts",
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateHooks = void 0;
|
|
4
4
|
const cli_1 = require("@graphql-codegen/cli");
|
|
5
|
-
const internal_1 = require("@nx/js/internal");
|
|
6
|
-
const node_path_1 = require("node:path");
|
|
7
5
|
/**
|
|
8
6
|
* Generates React hooks from your graphql files.
|
|
9
7
|
*
|
|
@@ -30,17 +28,8 @@ const generateHooks = async (options) => {
|
|
|
30
28
|
// eslint-disable-next-line no-console
|
|
31
29
|
console.log(contextConfig);
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// aliases codegen.ts imports only resolve once we register them ourselves.
|
|
36
|
-
const unregisterTsProject = (0, internal_1.registerTsProject)((0, node_path_1.join)(options.nxRoot, "tsconfig.base.json"));
|
|
37
|
-
try {
|
|
38
|
-
const context = await (0, cli_1.createContext)(contextConfig);
|
|
39
|
-
return await (0, cli_1.generate)(context);
|
|
40
|
-
}
|
|
41
|
-
finally {
|
|
42
|
-
unregisterTsProject();
|
|
43
|
-
}
|
|
31
|
+
const context = await (0, cli_1.createContext)(contextConfig);
|
|
32
|
+
return await (0, cli_1.generate)(context);
|
|
44
33
|
};
|
|
45
34
|
exports.generateHooks = generateHooks;
|
|
46
35
|
//# sourceMappingURL=generateHooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateHooks.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/executors/createHooks/generateHooks.ts"],"names":[],"mappings":";;;AAAA,8CAA+D;AAC/D
|
|
1
|
+
{"version":3,"file":"generateHooks.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/executors/createHooks/generateHooks.ts"],"names":[],"mappings":";;;AAAA,8CAA+D;AAC/D;;;;;;;;GAQG;AACI,MAAM,aAAa,GAAG,KAAK,EAAE,OAKnC,EAAE,EAAE;IACH,MAAM,aAAa,GAAG;QACpB,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,CAAC,OAAO,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,OAAO,CAAC,YAAY;QAC7B,MAAM,EAAE,OAAO,CAAC,eAAe;QAC/B,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,OAAO,CAAC,SAAS;QAC1B,KAAK,EAAE,OAAO,CAAC,SAAS;KACzB,CAAC;IACF,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACtB,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAa,EAAC,aAAa,CAAC,CAAC;IAEnD,OAAO,MAAM,IAAA,cAAQ,EAAC,OAAO,CAAC,CAAC;AACjC,CAAC,CAAC;AA1BW,QAAA,aAAa,iBA0BxB","sourcesContent":["import { createContext, generate } from \"@graphql-codegen/cli\";\n/**\n * Generates React hooks from your graphql files.\n *\n * @param options - The generation options.\n * @param options.codeGenFilePath - The path to the codegen file.\n * @param options.nxRoot - The nx root.\n * @param options.tsConfigPath - The path to the tsconfig file.\n * @param options.isVerbose - If true, will log more information.\n */\nexport const generateHooks = async (options: {\n codeGenFilePath: string;\n nxRoot: string;\n isVerbose?: boolean;\n tsConfigPath: string;\n}) => {\n const contextConfig = {\n watch: false,\n overwrite: true,\n silent: !options.isVerbose,\n errorsOnly: false,\n profile: false,\n project: options.tsConfigPath,\n config: options.codeGenFilePath,\n require: [],\n verbose: options.isVerbose,\n debug: options.isVerbose,\n };\n if (options.isVerbose) {\n // eslint-disable-next-line no-console\n console.log(contextConfig);\n }\n\n const context = await createContext(contextConfig);\n\n return await generate(context);\n};\n"]}
|