@trackunit/iris-app-build-utilities 0.0.313 → 0.0.316

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,24 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.0.316](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.315...iris-app-build-utilities/0.0.316) (2023-12-01)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `css-components` updated to version `0.0.315`
10
+ * `css-components` updated to version `0.0.315`
11
+ ## [0.0.315](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.314...iris-app-build-utilities/0.0.315) (2023-11-29)
12
+
13
+ ### Dependency Updates
14
+
15
+ * `css-components` updated to version `0.0.314`
16
+ * `css-components` updated to version `0.0.314`
17
+ ## [0.0.314](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.313...iris-app-build-utilities/0.0.314) (2023-11-29)
18
+
19
+ ### Dependency Updates
20
+
21
+ * `css-components` updated to version `0.0.313`
22
+ * `css-components` updated to version `0.0.313`
5
23
  ## [0.0.313](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.312...iris-app-build-utilities/0.0.313) (2023-11-29)
6
24
 
7
25
  ### Dependency Updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-build-utilities",
3
- "version": "0.0.313",
3
+ "version": "0.0.316",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -12,14 +12,25 @@ const path_1 = require("path");
12
12
  * @returns GraphQL code generation config.
13
13
  */
14
14
  const getGraphqlCodegenConfig = (nxLibPath, gqlFilesRegex) => {
15
- const schemaFilePath = (0, path_1.join)(__dirname, "..", "..", "..", "..", "libs", "api", "public-gql-schema", "src", "public-schema.gql");
16
- const schemaUrlOrPath = (0, fs_1.existsSync)(schemaFilePath) ? schemaFilePath : "https://iris.trackunit.com/api/graphql/";
15
+ const internalSchemaFilePath = (0, path_1.join)(__dirname, "..", "..", "..", "..", "libs", "api", "internal-gql-schema", "src", "internal-schema.gql");
16
+ const publicSchemaUrlOrInternalSchemaPath = (0, fs_1.existsSync)(internalSchemaFilePath)
17
+ ? internalSchemaFilePath
18
+ : "https://iris.trackunit.com/api/graphql/";
17
19
  // eslint-disable-next-line no-console
18
- console.log(`Using schema: ${schemaUrlOrPath}`);
20
+ console.log(`Using schema: ${publicSchemaUrlOrInternalSchemaPath}`);
21
+ const generatedGqlOutputFolder = `${nxLibPath}/src/generated/graphql-api/`;
22
+ if ((0, fs_1.existsSync)(generatedGqlOutputFolder)) {
23
+ (0, fs_1.rmdirSync)(generatedGqlOutputFolder, { recursive: true });
24
+ }
25
+ const documents = [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || "**/*.graphql"}`];
26
+ if (!gqlFilesRegex) {
27
+ documents.push(`!${nxLibPath}/src/**/*-manager.graphql`);
28
+ }
29
+ console.log(documents);
19
30
  const generates = {};
20
- generates[`${nxLibPath}/src/generated/graphql-api/`] = {
21
- schema: schemaUrlOrPath,
22
- documents: [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || "**/*.graphql"}`],
31
+ generates[generatedGqlOutputFolder] = {
32
+ schema: publicSchemaUrlOrInternalSchemaPath,
33
+ documents,
23
34
  preset: "client",
24
35
  plugins: [
25
36
  {
@@ -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;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"]}
1
+ {"version":3,"file":"getGraphqlCodeGenConfig.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getGraphqlCodeGenConfig.ts"],"names":[],"mappings":";;;AACA,2BAA2C;AAC3C,+BAA4B;AAE5B;;;;;;;GAOG;AACI,MAAM,uBAAuB,GAAiE,CACnG,SAAiB,EACjB,aAAsB,EACtB,EAAE;IACF,MAAM,sBAAsB,GAAG,IAAA,WAAI,EACjC,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,qBAAqB,EACrB,KAAK,EACL,qBAAqB,CACtB,CAAC;IACF,MAAM,mCAAmC,GAAG,IAAA,eAAU,EAAC,sBAAsB,CAAC;QAC5E,CAAC,CAAC,sBAAsB;QACxB,CAAC,CAAC,yCAAyC,CAAC;IAE9C,sCAAsC;IACtC,OAAO,CAAC,GAAG,CAAC,iBAAiB,mCAAmC,EAAE,CAAC,CAAC;IAEpE,MAAM,wBAAwB,GAAG,GAAG,SAAS,6BAA6B,CAAC;IAC3E,IAAI,IAAA,eAAU,EAAC,wBAAwB,CAAC,EAAE;QACxC,IAAA,cAAS,EAAC,wBAAwB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;KAC1D;IAED,MAAM,SAAS,GAAG,CAAC,GAAG,SAAS,eAAe,EAAE,GAAG,SAAS,QAAQ,aAAa,IAAI,cAAc,EAAE,CAAC,CAAC;IACvG,IAAI,CAAC,aAAa,EAAE;QAClB,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,2BAA2B,CAAC,CAAC;KAC1D;IACD,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACvB,MAAM,SAAS,GAA+B,EAAE,CAAC;IACjD,SAAS,CAAC,wBAAwB,CAAC,GAAG;QACpC,MAAM,EAAE,mCAAmC;QAC3C,SAAS;QACT,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;AA5EW,QAAA,uBAAuB,2BA4ElC","sourcesContent":["import { CodegenConfig } from \"@graphql-codegen/cli\";\nimport { existsSync, rmdirSync } 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 internalSchemaFilePath = join(\n __dirname,\n \"..\",\n \"..\",\n \"..\",\n \"..\",\n \"libs\",\n \"api\",\n \"internal-gql-schema\",\n \"src\",\n \"internal-schema.gql\"\n );\n const publicSchemaUrlOrInternalSchemaPath = existsSync(internalSchemaFilePath)\n ? internalSchemaFilePath\n : \"https://iris.trackunit.com/api/graphql/\";\n\n // eslint-disable-next-line no-console\n console.log(`Using schema: ${publicSchemaUrlOrInternalSchemaPath}`);\n\n const generatedGqlOutputFolder = `${nxLibPath}/src/generated/graphql-api/`;\n if (existsSync(generatedGqlOutputFolder)) {\n rmdirSync(generatedGqlOutputFolder, { recursive: true });\n }\n\n const documents = [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || \"**/*.graphql\"}`];\n if (!gqlFilesRegex) {\n documents.push(`!${nxLibPath}/src/**/*-manager.graphql`);\n }\n console.log(documents);\n const generates: CodegenConfig[\"generates\"] = {};\n generates[generatedGqlOutputFolder] = {\n schema: publicSchemaUrlOrInternalSchemaPath,\n documents,\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"]}
package/src/index.d.ts CHANGED
@@ -2,7 +2,6 @@ export * from "./enableTsConfigPath";
2
2
  export * from "./getAliasesFromTsConfig";
3
3
  export * from "./getExposedExtensions";
4
4
  export * from "./getGraphqlCodeGenConfig";
5
- export * from "./getGraphqlCodeGenConfigForInternal";
6
5
  export * from "./getSharedDependencies";
7
6
  export * from "./getTailwindContentForApp";
8
7
  export * from "./getTileWebpackDevServer";
package/src/index.js CHANGED
@@ -5,7 +5,6 @@ tslib_1.__exportStar(require("./enableTsConfigPath"), exports);
5
5
  tslib_1.__exportStar(require("./getAliasesFromTsConfig"), exports);
6
6
  tslib_1.__exportStar(require("./getExposedExtensions"), exports);
7
7
  tslib_1.__exportStar(require("./getGraphqlCodeGenConfig"), exports);
8
- tslib_1.__exportStar(require("./getGraphqlCodeGenConfigForInternal"), exports);
9
8
  tslib_1.__exportStar(require("./getSharedDependencies"), exports);
10
9
  tslib_1.__exportStar(require("./getTailwindContentForApp"), exports);
11
10
  tslib_1.__exportStar(require("./getTileWebpackDevServer"), exports);
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC;AACrC,mEAAyC;AACzC,iEAAuC;AACvC,oEAA0C;AAC1C,+EAAqD;AACrD,kEAAwC;AACxC,qEAA2C;AAC3C,oEAA0C","sourcesContent":["export * from \"./enableTsConfigPath\";\nexport * from \"./getAliasesFromTsConfig\";\nexport * from \"./getExposedExtensions\";\nexport * from \"./getGraphqlCodeGenConfig\";\nexport * from \"./getGraphqlCodeGenConfigForInternal\";\nexport * from \"./getSharedDependencies\";\nexport * from \"./getTailwindContentForApp\";\nexport * from \"./getTileWebpackDevServer\";\n\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC;AACrC,mEAAyC;AACzC,iEAAuC;AACvC,oEAA0C;AAC1C,kEAAwC;AACxC,qEAA2C;AAC3C,oEAA0C","sourcesContent":["export * from \"./enableTsConfigPath\";\nexport * from \"./getAliasesFromTsConfig\";\nexport * from \"./getExposedExtensions\";\nexport * from \"./getGraphqlCodeGenConfig\";\nexport * from \"./getSharedDependencies\";\nexport * from \"./getTailwindContentForApp\";\nexport * from \"./getTileWebpackDevServer\";\n"]}
@@ -1,11 +0,0 @@
1
- import { CodegenConfig } from "@graphql-codegen/cli";
2
- /**
3
- *
4
- * This function returns the codegen config for trackunit internal graphql-codegen.
5
- *
6
- * @param nxLibPath The library path.
7
- * @param gqlFilesRegex (optional) The regex to find the files that declares queries to the internal GQL. Default value: '**\/*.graphql'.
8
- * Use it when the library needs to call both internal and not internal GQL to limit set of files to internal.
9
- * @returns GraphQL code generation config.
10
- */
11
- export declare const getGraphqlCodegenConfigForInternal: (nxLibPath: string, gqlFilesRegex?: string) => CodegenConfig;
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getGraphqlCodegenConfigForInternal = void 0;
4
- const fs_1 = require("fs");
5
- const path_1 = require("path");
6
- /**
7
- *
8
- * This function returns the codegen config for trackunit internal graphql-codegen.
9
- *
10
- * @param nxLibPath The library path.
11
- * @param gqlFilesRegex (optional) The regex to find the files that declares queries to the internal GQL. Default value: '**\/*.graphql'.
12
- * Use it when the library needs to call both internal and not internal GQL to limit set of files to internal.
13
- * @returns GraphQL code generation config.
14
- */
15
- const getGraphqlCodegenConfigForInternal = (nxLibPath, gqlFilesRegex) => {
16
- const schemaFilePath = (0, path_1.join)(__dirname, "..", "..", "..", "..", "libs", "api", "internal-gql-schema", "src", "internal-schema.gql");
17
- const schemaUrlOrPath = (0, fs_1.existsSync)(schemaFilePath)
18
- ? schemaFilePath
19
- : "https://iris.trackunit.com/api/graphql/internal";
20
- // eslint-disable-next-line no-console
21
- console.log(`Using internal schema: ${schemaUrlOrPath}`);
22
- const generates = {};
23
- generates[`${nxLibPath}/src/generated/internal-graphql-api/`] = {
24
- schema: schemaUrlOrPath,
25
- documents: [`${nxLibPath}/src/**/*.tsx`, `${nxLibPath}/src/${gqlFilesRegex || "**/*-internal.graphql"}`],
26
- preset: "client",
27
- plugins: [
28
- {
29
- add: {
30
- content: [
31
- "export type DateTimeISOString = string;",
32
- "import type { PublicIrisAppManifest } from '@trackunit/iris-app-api';",
33
- ],
34
- },
35
- },
36
- ],
37
- config: {
38
- scalars: {
39
- Cursor: "string",
40
- Date: "DateTimeISOString",
41
- DateTime: "DateTimeISOString",
42
- GeoJSONCoordinates: "number[] | number[][]",
43
- PublicIrisAppManifest: "PublicIrisAppManifest",
44
- },
45
- },
46
- presetConfig: {
47
- fragmentMasking: { unmaskFunctionName: "getFragmentData" },
48
- // We need to do this later after scrubbing
49
- enumsAsConst: false,
50
- noExport: true,
51
- avoidOptionals: true,
52
- noNamespaces: true,
53
- namingConvention: {
54
- typeNames: "keep",
55
- enumValues: "pascal-case#pascalCase",
56
- },
57
- },
58
- };
59
- return {
60
- schema: "",
61
- ignoreNoDocuments: true,
62
- generates,
63
- };
64
- };
65
- exports.getGraphqlCodegenConfigForInternal = getGraphqlCodegenConfigForInternal;
66
- //# sourceMappingURL=getGraphqlCodeGenConfigForInternal.js.map
@@ -1 +0,0 @@
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"]}