@trackunit/iris-app-build-utilities 0.0.272 → 0.0.273

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.273](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.272...iris-app-build-utilities/0.0.273) (2023-10-30)
6
+
5
7
  ## [0.0.272](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.271...iris-app-build-utilities/0.0.272) (2023-10-30)
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.272",
3
+ "version": "0.0.273",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -23,8 +23,10 @@
23
23
  "@trackunit/css-component-tokens": "0.0.43",
24
24
  "@trackunit/css-components": "0.0.440",
25
25
  "@trackunit/css-core": "0.0.99",
26
+ "@trackunit/css-tailwind": "0.0.93",
26
27
  "@trackunit/css-tailwind-custom-properties-plugin": "0.0.32",
27
28
  "@trackunit/iris-app-api": "0.0.126",
29
+ "@trackunit/react-components": "0.1.187",
28
30
  "@trackunit/shared-utils": "0.0.14",
29
31
  "@trackunit/ui-design-tokens": "0.0.79",
30
32
  "@trackunit/ui-icons": "0.0.78",
@@ -42,7 +44,7 @@
42
44
  "react-useportal": "1.0.18",
43
45
  "tailwind-merge": "1.13.0",
44
46
  "zod": "3.22.3",
45
- "tslib": "1.14.1"
47
+ "tslib": "2.6.0"
46
48
  },
47
49
  "main": "./src/index.js",
48
50
  "type": "commonjs"
@@ -24,7 +24,10 @@ const getGraphqlCodegenConfig = (nxLibPath, gqlFilesRegex) => {
24
24
  plugins: [
25
25
  {
26
26
  add: {
27
- content: ["export type DateTimeISOString = string;"],
27
+ content: [
28
+ "export type DateTimeISOString = string;",
29
+ "import type { PublicIrisAppManifest } from '@trackunit/iris-app-api';",
30
+ ],
28
31
  },
29
32
  },
30
33
  ],
@@ -34,7 +37,7 @@ const getGraphqlCodegenConfig = (nxLibPath, gqlFilesRegex) => {
34
37
  Date: "DateTimeISOString",
35
38
  DateTime: "DateTimeISOString",
36
39
  GeoJSONCoordinates: "number[] | number[][]",
37
- PublicIrisAppManifest: "import('@trackunit/iris-app-api').PublicIrisAppManifest",
40
+ PublicIrisAppManifest: "PublicIrisAppManifest",
38
41
  },
39
42
  },
40
43
  presetConfig: {
@@ -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;;;;;;;GAOG;AACI,MAAM,uBAAuB,GAAiE,CACnG,SAAiB,EACjB,aAAsB,EACtB,EAAE;IACF,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,sCAAsC;IACtC,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,eAAe;QACvB,SAAS,EAAE,CAAC,GAAG,SAAS,eAAe,EAAE,GAAG,SAAS,QAAQ,aAAa,IAAI,cAAc,EAAE,CAAC;QAC/F,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE;YACP;gBACE,GAAG,EAAE;oBACH,OAAO,EAAE,CAAC,yCAAyC,CAAC;iBACrD;aACF;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,MAAM,EAAE,QAAQ;gBAChB,IAAI,EAAE,mBAAmB;gBACzB,QAAQ,EAAE,mBAAmB;gBAC7B,kBAAkB,EAAE,uBAAuB;gBAC3C,qBAAqB,EAAE,yDAAyD;aACjF;SACF;QACD,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;SACF;KACF,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,EAAE;QACV,iBAAiB,EAAE,IAAI;QACvB,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AA5DW,QAAA,uBAAuB,2BA4DlC","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 = (\n nxLibPath: string,\n gqlFilesRegex?: string\n) => {\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 // eslint-disable-next-line no-console\n console.log(`Using schema: ${schemaUrlOrPath}`);\n\n const generates: CodegenConfig[\"generates\"] = {};\n generates[`${nxLibPath}/src/generated/graphql-api/`] = {\n schema: schemaUrlOrPath,\n documents: [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || \"**/*.graphql\"}`],\n preset: \"client\",\n plugins: [\n {\n add: {\n content: [\"export type DateTimeISOString = string;\"],\n },\n },\n ],\n config: {\n scalars: {\n Cursor: \"string\",\n Date: \"DateTimeISOString\",\n DateTime: \"DateTimeISOString\",\n GeoJSONCoordinates: \"number[] | number[][]\",\n PublicIrisAppManifest: \"import('@trackunit/iris-app-api').PublicIrisAppManifest\",\n },\n },\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 },\n };\n\n return {\n schema: \"\",\n ignoreNoDocuments: true, // for better experience with the watcher\n generates,\n };\n};\n"]}
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,CACnG,SAAiB,EACjB,aAAsB,EACtB,EAAE;IACF,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,sCAAsC;IACtC,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,eAAe;QACvB,SAAS,EAAE,CAAC,GAAG,SAAS,eAAe,EAAE,GAAG,SAAS,QAAQ,aAAa,IAAI,cAAc,EAAE,CAAC;QAC/F,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE;YACP;gBACE,GAAG,EAAE;oBACH,OAAO,EAAE;wBACP,yCAAyC;wBACzC,uEAAuE;qBACxE;iBACF;aACF;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,MAAM,EAAE,QAAQ;gBAChB,IAAI,EAAE,mBAAmB;gBACzB,QAAQ,EAAE,mBAAmB;gBAC7B,kBAAkB,EAAE,uBAAuB;gBAC3C,qBAAqB,EAAE,uBAAuB;aAC/C;SACF;QACD,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;SACF;KACF,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,EAAE;QACV,iBAAiB,EAAE,IAAI;QACvB,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AA/DW,QAAA,uBAAuB,2BA+DlC","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 = (\n nxLibPath: string,\n gqlFilesRegex?: string\n) => {\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 // eslint-disable-next-line no-console\n console.log(`Using schema: ${schemaUrlOrPath}`);\n\n const generates: CodegenConfig[\"generates\"] = {};\n generates[`${nxLibPath}/src/generated/graphql-api/`] = {\n schema: schemaUrlOrPath,\n documents: [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || \"**/*.graphql\"}`],\n preset: \"client\",\n plugins: [\n {\n add: {\n content: [\n \"export type DateTimeISOString = string;\",\n \"import type { PublicIrisAppManifest } from '@trackunit/iris-app-api';\",\n ],\n },\n },\n ],\n config: {\n scalars: {\n Cursor: \"string\",\n Date: \"DateTimeISOString\",\n DateTime: \"DateTimeISOString\",\n GeoJSONCoordinates: \"number[] | number[][]\",\n PublicIrisAppManifest: \"PublicIrisAppManifest\",\n },\n },\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 },\n };\n\n return {\n schema: \"\",\n ignoreNoDocuments: true, // for better experience with the watcher\n generates,\n };\n};\n"]}
@@ -27,7 +27,10 @@ const getGraphqlCodegenConfigForInternal = (nxLibPath, gqlFilesRegex) => {
27
27
  plugins: [
28
28
  {
29
29
  add: {
30
- content: ["export type DateTimeISOString = string;"],
30
+ content: [
31
+ "export type DateTimeISOString = string;",
32
+ "import type { PublicIrisAppManifest } from '@trackunit/iris-app-api';",
33
+ ],
31
34
  },
32
35
  },
33
36
  ],
@@ -37,7 +40,7 @@ const getGraphqlCodegenConfigForInternal = (nxLibPath, gqlFilesRegex) => {
37
40
  Date: "DateTimeISOString",
38
41
  DateTime: "DateTimeISOString",
39
42
  GeoJSONCoordinates: "number[] | number[][]",
40
- PublicIrisAppManifest: "import('@trackunit/iris-app-api').PublicIrisAppManifest",
43
+ PublicIrisAppManifest: "PublicIrisAppManifest",
41
44
  },
42
45
  },
43
46
  presetConfig: {
@@ -1 +1 @@
1
- {"version":3,"file":"getGraphqlCodeGenConfigForInternal.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getGraphqlCodeGenConfigForInternal.ts"],"names":[],"mappings":";;;AACA,2BAAgC;AAChC,+BAA4B;AAE5B;;;;;;;;GAQG;AACI,MAAM,kCAAkC,GAAiE,CAC9G,SAAiB,EACjB,aAAsB,EACtB,EAAE;IACF,MAAM,cAAc,GAAG,IAAA,WAAI,EACzB,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,qBAAqB,EACrB,KAAK,EACL,qBAAqB,CACtB,CAAC;IACF,MAAM,eAAe,GAAG,IAAA,eAAU,EAAC,cAAc,CAAC;QAChD,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,iDAAiD,CAAC;IACtD,sCAAsC;IACtC,OAAO,CAAC,GAAG,CAAC,0BAA0B,eAAe,EAAE,CAAC,CAAC;IAEzD,MAAM,SAAS,GAA+B,EAAE,CAAC;IACjD,SAAS,CAAC,GAAG,SAAS,sCAAsC,CAAC,GAAG;QAC9D,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,CAAC,GAAG,SAAS,eAAe,EAAE,GAAG,SAAS,QAAQ,aAAa,IAAI,uBAAuB,EAAE,CAAC;QACxG,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE;YACP;gBACE,GAAG,EAAE;oBACH,OAAO,EAAE,CAAC,yCAAyC,CAAC;iBACrD;aACF;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,MAAM,EAAE,QAAQ;gBAChB,IAAI,EAAE,mBAAmB;gBACzB,QAAQ,EAAE,mBAAmB;gBAC7B,kBAAkB,EAAE,uBAAuB;gBAC3C,qBAAqB,EAAE,yDAAyD;aACjF;SACF;QACD,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;SACF;KACF,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,EAAE;QACV,iBAAiB,EAAE,IAAI;QACvB,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AA9DW,QAAA,kCAAkC,sCA8D7C","sourcesContent":["import { CodegenConfig } from \"@graphql-codegen/cli\";\nimport { existsSync } from \"fs\";\nimport { join } from \"path\";\n\n/**\n *\n * This function returns the codegen config for trackunit internal graphql-codegen.\n *\n * @param nxLibPath The library path.\n * @param gqlFilesRegex (optional) The regex to find the files that declares queries to the internal GQL. Default value: '**\\/*.graphql'.\n * Use it when the library needs to call both internal and not internal GQL to limit set of files to internal.\n * @returns GraphQL code generation config.\n */\nexport const getGraphqlCodegenConfigForInternal: (nxLibPath: string, gqlFilesRegex?: string) => CodegenConfig = (\n nxLibPath: string,\n gqlFilesRegex?: string\n) => {\n const schemaFilePath = join(\n __dirname,\n \"..\",\n \"..\",\n \"..\",\n \"..\",\n \"libs\",\n \"api\",\n \"internal-gql-schema\",\n \"src\",\n \"internal-schema.gql\"\n );\n const schemaUrlOrPath = existsSync(schemaFilePath)\n ? schemaFilePath\n : \"https://iris.trackunit.com/api/graphql/internal\";\n // eslint-disable-next-line no-console\n console.log(`Using internal schema: ${schemaUrlOrPath}`);\n\n const generates: CodegenConfig[\"generates\"] = {};\n generates[`${nxLibPath}/src/generated/internal-graphql-api/`] = {\n schema: schemaUrlOrPath,\n documents: [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || \"**/*-internal.graphql\"}`],\n preset: \"client\",\n plugins: [\n {\n add: {\n content: [\"export type DateTimeISOString = string;\"],\n },\n },\n ],\n config: {\n scalars: {\n Cursor: \"string\",\n Date: \"DateTimeISOString\",\n DateTime: \"DateTimeISOString\",\n GeoJSONCoordinates: \"number[] | number[][]\",\n PublicIrisAppManifest: \"import('@trackunit/iris-app-api').PublicIrisAppManifest\",\n },\n },\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 },\n };\n\n return {\n schema: \"\",\n ignoreNoDocuments: true, // for better experience with the watcher\n generates,\n };\n};\n"]}
1
+ {"version":3,"file":"getGraphqlCodeGenConfigForInternal.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getGraphqlCodeGenConfigForInternal.ts"],"names":[],"mappings":";;;AACA,2BAAgC;AAChC,+BAA4B;AAE5B;;;;;;;;GAQG;AACI,MAAM,kCAAkC,GAAiE,CAC9G,SAAiB,EACjB,aAAsB,EACtB,EAAE;IACF,MAAM,cAAc,GAAG,IAAA,WAAI,EACzB,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,qBAAqB,EACrB,KAAK,EACL,qBAAqB,CACtB,CAAC;IACF,MAAM,eAAe,GAAG,IAAA,eAAU,EAAC,cAAc,CAAC;QAChD,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,iDAAiD,CAAC;IACtD,sCAAsC;IACtC,OAAO,CAAC,GAAG,CAAC,0BAA0B,eAAe,EAAE,CAAC,CAAC;IAEzD,MAAM,SAAS,GAA+B,EAAE,CAAC;IACjD,SAAS,CAAC,GAAG,SAAS,sCAAsC,CAAC,GAAG;QAC9D,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,CAAC,GAAG,SAAS,eAAe,EAAE,GAAG,SAAS,QAAQ,aAAa,IAAI,uBAAuB,EAAE,CAAC;QACxG,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE;YACP;gBACE,GAAG,EAAE;oBACH,OAAO,EAAE;wBACP,yCAAyC;wBACzC,uEAAuE;qBACxE;iBACF;aACF;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,MAAM,EAAE,QAAQ;gBAChB,IAAI,EAAE,mBAAmB;gBACzB,QAAQ,EAAE,mBAAmB;gBAC7B,kBAAkB,EAAE,uBAAuB;gBAC3C,qBAAqB,EAAE,uBAAuB;aAC/C;SACF;QACD,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;SACF;KACF,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,EAAE;QACV,iBAAiB,EAAE,IAAI;QACvB,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,kCAAkC,sCAiE7C","sourcesContent":["import { CodegenConfig } from \"@graphql-codegen/cli\";\nimport { existsSync } from \"fs\";\nimport { join } from \"path\";\n\n/**\n *\n * This function returns the codegen config for trackunit internal graphql-codegen.\n *\n * @param nxLibPath The library path.\n * @param gqlFilesRegex (optional) The regex to find the files that declares queries to the internal GQL. Default value: '**\\/*.graphql'.\n * Use it when the library needs to call both internal and not internal GQL to limit set of files to internal.\n * @returns GraphQL code generation config.\n */\nexport const getGraphqlCodegenConfigForInternal: (nxLibPath: string, gqlFilesRegex?: string) => CodegenConfig = (\n nxLibPath: string,\n gqlFilesRegex?: string\n) => {\n const schemaFilePath = join(\n __dirname,\n \"..\",\n \"..\",\n \"..\",\n \"..\",\n \"libs\",\n \"api\",\n \"internal-gql-schema\",\n \"src\",\n \"internal-schema.gql\"\n );\n const schemaUrlOrPath = existsSync(schemaFilePath)\n ? schemaFilePath\n : \"https://iris.trackunit.com/api/graphql/internal\";\n // eslint-disable-next-line no-console\n console.log(`Using internal schema: ${schemaUrlOrPath}`);\n\n const generates: CodegenConfig[\"generates\"] = {};\n generates[`${nxLibPath}/src/generated/internal-graphql-api/`] = {\n schema: schemaUrlOrPath,\n documents: [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || \"**/*-internal.graphql\"}`],\n preset: \"client\",\n plugins: [\n {\n add: {\n content: [\n \"export type DateTimeISOString = string;\",\n \"import type { PublicIrisAppManifest } from '@trackunit/iris-app-api';\",\n ],\n },\n },\n ],\n config: {\n scalars: {\n Cursor: \"string\",\n Date: \"DateTimeISOString\",\n DateTime: \"DateTimeISOString\",\n GeoJSONCoordinates: \"number[] | number[][]\",\n PublicIrisAppManifest: \"PublicIrisAppManifest\",\n },\n },\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 },\n };\n\n return {\n schema: \"\",\n ignoreNoDocuments: true, // for better experience with the watcher\n generates,\n };\n};\n"]}