@trackunit/iris-app-build-utilities 0.0.220 → 0.0.221
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,8 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.221](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.220...iris-app-build-utilities/0.0.221) (2023-08-29)
|
|
6
|
+
|
|
5
7
|
## [0.0.220](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.219...iris-app-build-utilities/0.0.220) (2023-08-29)
|
|
6
8
|
|
|
7
9
|
### Dependency Updates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-build-utilities",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.221",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"repository": "https://github.com/Trackunit/manager",
|
|
6
6
|
"engines": {
|
|
@@ -22,11 +22,8 @@
|
|
|
22
22
|
"@babel/template": "7.18.10",
|
|
23
23
|
"@floating-ui/react": "0.22.2",
|
|
24
24
|
"@heroicons/react": "2.0.16",
|
|
25
|
-
"@trackunit/css-class-variance-utilities": "0.0.11",
|
|
26
25
|
"@trackunit/css-components": "0.0.400",
|
|
27
|
-
"@trackunit/css-core": "0.0.92",
|
|
28
26
|
"@trackunit/iris-app-api": "0.0.107",
|
|
29
|
-
"@trackunit/ui-design-tokens": "0.0.75",
|
|
30
27
|
"camelcase": "5.3.1",
|
|
31
28
|
"capitalize": "2.0.4",
|
|
32
29
|
"class-variance-authority": "0.6.0",
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { CodegenConfig } from "@graphql-codegen/cli";
|
|
2
2
|
/**
|
|
3
3
|
* This function returns the codegen config for trackunit public graphql-codegen.
|
|
4
|
+
*
|
|
5
|
+
* @param nxLibPath The library path.
|
|
6
|
+
* @param gqlFilesRegex (optional) The regex to find the files that declares queries to the public GQL. Default value: '**\/*.graphql'.
|
|
7
|
+
* Use it when the library needs to call both public and not public GQL to limit set of files to public.
|
|
8
|
+
* @returns GraphQL code generation config.
|
|
4
9
|
*/
|
|
5
|
-
export declare const getGraphqlCodegenConfig: (nxLibPath: string) => CodegenConfig;
|
|
10
|
+
export declare const getGraphqlCodegenConfig: (nxLibPath: string, gqlFilesRegex?: string) => CodegenConfig;
|
|
@@ -5,8 +5,13 @@ const fs_1 = require("fs");
|
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
/**
|
|
7
7
|
* This function returns the codegen config for trackunit public graphql-codegen.
|
|
8
|
+
*
|
|
9
|
+
* @param nxLibPath The library path.
|
|
10
|
+
* @param gqlFilesRegex (optional) The regex to find the files that declares queries to the public GQL. Default value: '**\/*.graphql'.
|
|
11
|
+
* Use it when the library needs to call both public and not public GQL to limit set of files to public.
|
|
12
|
+
* @returns GraphQL code generation config.
|
|
8
13
|
*/
|
|
9
|
-
const getGraphqlCodegenConfig = (nxLibPath) => {
|
|
14
|
+
const getGraphqlCodegenConfig = (nxLibPath, gqlFilesRegex) => {
|
|
10
15
|
const schemaFilePath = (0, path_1.join)(__dirname, "..", "..", "..", "..", "libs", "api", "public-gql-schema", "src", "public-schema.gql");
|
|
11
16
|
const schemaUrlOrPath = (0, fs_1.existsSync)(schemaFilePath) ? schemaFilePath : "https://iris.trackunit.com/api/graphql/";
|
|
12
17
|
console.log(`Using schema: ${schemaUrlOrPath}`);
|
|
@@ -32,7 +37,7 @@ const getGraphqlCodegenConfig = (nxLibPath) => {
|
|
|
32
37
|
};
|
|
33
38
|
return {
|
|
34
39
|
schema: schemaUrlOrPath,
|
|
35
|
-
documents: [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src
|
|
40
|
+
documents: [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || "**/*.graphql"}`],
|
|
36
41
|
ignoreNoDocuments: true,
|
|
37
42
|
generates,
|
|
38
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGraphqlCodeGenConfig.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getGraphqlCodeGenConfig.ts"],"names":[],"mappings":";;;AACA,2BAAgC;AAChC,+BAA4B;AAE5B
|
|
1
|
+
{"version":3,"file":"getGraphqlCodeGenConfig.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getGraphqlCodeGenConfig.ts"],"names":[],"mappings":";;;AACA,2BAAgC;AAChC,+BAA4B;AAE5B;;;;;;;GAOG;AACI,MAAM,uBAAuB,GAAiE,CAAC,SAAiB,EAAE,aAAsB,EAAE,EAAE;IACjJ,MAAM,cAAc,GAAG,IAAA,WAAI,EACzB,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,mBAAmB,EACnB,KAAK,EACL,mBAAmB,CACpB,CAAC;IACF,MAAM,eAAe,GAAG,IAAA,eAAU,EAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,yCAAyC,CAAC;IAChH,OAAO,CAAC,GAAG,CAAC,iBAAiB,eAAe,EAAE,CAAC,CAAC;IAEhD,MAAM,SAAS,GAA+B,EAAE,CAAC;IACjD,SAAS,CAAC,GAAG,SAAS,6BAA6B,CAAC,GAAG;QACrD,MAAM,EAAE,QAAQ;QAChB,YAAY,EAAE;YACZ,eAAe,EAAE,EAAE,kBAAkB,EAAE,iBAAiB,EAAE;YAC1D,2CAA2C;YAC3C,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,IAAI;YACd,cAAc,EAAE,IAAI;YACpB,YAAY,EAAE,IAAI;YAClB,gBAAgB,EAAE;gBAChB,SAAS,EAAE,MAAM;gBACjB,UAAU,EAAE,wBAAwB;aACrC;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,MAAM;aACjB;SACF;KACF,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,CAAC,GAAG,SAAS,eAAe,EAAE,GAAG,SAAS,QAAQ,aAAa,IAAI,cAAc,EAAE,CAAC;QAC/F,iBAAiB,EAAE,IAAI;QACvB,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,uBAAuB,2BA2ClC","sourcesContent":["import { CodegenConfig } from \"@graphql-codegen/cli\";\nimport { existsSync } from \"fs\";\nimport { join } from \"path\";\n\n/**\n * This function returns the codegen config for trackunit public graphql-codegen.\n *\n * @param nxLibPath The library path.\n * @param gqlFilesRegex (optional) The regex to find the files that declares queries to the public GQL. Default value: '**\\/*.graphql'.\n * Use it when the library needs to call both public and not public GQL to limit set of files to public.\n * @returns GraphQL code generation config.\n */\nexport const getGraphqlCodegenConfig: (nxLibPath: string, gqlFilesRegex?: string) => CodegenConfig = (nxLibPath: string, gqlFilesRegex?: string) => {\n const schemaFilePath = join(\n __dirname,\n \"..\",\n \"..\",\n \"..\",\n \"..\",\n \"libs\",\n \"api\",\n \"public-gql-schema\",\n \"src\",\n \"public-schema.gql\"\n );\n const schemaUrlOrPath = existsSync(schemaFilePath) ? schemaFilePath : \"https://iris.trackunit.com/api/graphql/\";\n console.log(`Using schema: ${schemaUrlOrPath}`);\n\n const generates: CodegenConfig[\"generates\"] = {};\n generates[`${nxLibPath}/src/generated/graphql-api/`] = {\n preset: \"client\",\n presetConfig: {\n fragmentMasking: { unmaskFunctionName: \"getFragmentData\" },\n // We need to do this later after scrubbing\n enumsAsConst: false,\n noExport: true,\n avoidOptionals: true,\n noNamespaces: true,\n namingConvention: {\n typeNames: \"keep\",\n enumValues: \"pascal-case#pascalCase\",\n },\n scalars: {\n Date: \"Date\",\n DateTime: \"Date\",\n },\n },\n };\n\n return {\n schema: schemaUrlOrPath,\n documents: [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || \"**/*.graphql\"}`],\n ignoreNoDocuments: true, // for better experience with the watcher\n generates,\n };\n};\n"]}
|