@trackunit/iris-app-build-utilities 0.0.439 → 0.0.441
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,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.441](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.440...iris-app-build-utilities/0.0.441) (2024-09-10)
|
|
6
|
+
|
|
7
|
+
## [0.0.440](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.439...iris-app-build-utilities/0.0.440) (2024-09-09)
|
|
8
|
+
|
|
9
|
+
### Dependency Updates
|
|
10
|
+
|
|
11
|
+
* `iris-app-api` updated to version `0.0.439`
|
|
5
12
|
## [0.0.439](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.438...iris-app-build-utilities/0.0.439) (2024-09-05)
|
|
6
13
|
|
|
7
14
|
## [0.0.438](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.437...iris-app-build-utilities/0.0.438) (2024-09-05)
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ const path_1 = require("path");
|
|
|
11
11
|
* @returns {CodegenConfig } GraphQL code generation config.
|
|
12
12
|
*/
|
|
13
13
|
const getGraphqlCodegenConfig = (nxLibPath, gqlFilePaths) => {
|
|
14
|
-
const internalSchemaFilePath = (0, path_1.join)(__dirname, "..", "..", "..", "..", "libs", "api", "internal-gql-schema", "
|
|
14
|
+
const internalSchemaFilePath = (0, path_1.join)(__dirname, "..", "..", "..", "..", "libs", "api", "internal-gql-schema", "generated", "internal-schema.gql");
|
|
15
15
|
const publicSchemaUrlOrInternalSchemaPath = (0, fs_1.existsSync)(internalSchemaFilePath)
|
|
16
16
|
? internalSchemaFilePath
|
|
17
17
|
: "https://iris.trackunit.com/api/graphql/";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGraphqlCodeGenConfig.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getGraphqlCodeGenConfig.ts"],"names":[],"mappings":";;;AACA,2BAAwC;AACxC,+BAA4B;AAE5B;;;;;;GAMG;AACI,MAAM,uBAAuB,GAAkE,CACpG,SAAiB,EACjB,YAAuB,EACvB,EAAE;IACF,MAAM,sBAAsB,GAAG,IAAA,WAAI,EACjC,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"getGraphqlCodeGenConfig.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getGraphqlCodeGenConfig.ts"],"names":[],"mappings":";;;AACA,2BAAwC;AACxC,+BAA4B;AAE5B;;;;;;GAMG;AACI,MAAM,uBAAuB,GAAkE,CACpG,SAAiB,EACjB,YAAuB,EACvB,EAAE;IACF,MAAM,sBAAsB,GAAG,IAAA,WAAI,EACjC,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,qBAAqB,EACrB,WAAW,EACX,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,oFAAoF;IACpF,MAAM,wBAAwB,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,CAAC,GAAG,GAAG,CAAC;IAC1F,IAAI,IAAA,eAAU,EAAC,wBAAwB,CAAC,EAAE,CAAC;QACzC,IAAA,WAAM,EAAC,wBAAwB,EAAE,EAAE,SAA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ACD,YAAY,EAAE;YACZ,eAAe,EAAE,EAAE,kBAAkB,EAAE,iBAAiB,EAAE;YAC1D,QAAQ,EAAE,IAAI;YACd,cAAc,EAAE;gBACd,KAAK,EAAE,IAAI;gBACX,UAAU,EAAE,KAAK;gBACjB,MAAM,EAAE,IAAI;gBACZ,YAAY,EAAE,IAAI;aACnB;YACD,YAAY,EAAE,IAAI;YAClB,gBAAgB,EAAE;gBAChB,SAAS,EAAE,MAAM;gBACjB,UAAU,EAAE,MAAM;aACnB;SACF;KACF,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,EAAE;QACV,iBAAiB,EAAE,IAAI,EAAE,yCAAyC;QAClE,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AAhGW,QAAA,uBAAuB,2BAgGlC","sourcesContent":["import { CodegenConfig } from \"@graphql-codegen/cli\";\nimport { existsSync, rmSync } 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 gqlFilePaths (optional) An array of library relative paths to the graphql-files to generate hooks for.\n * @returns {CodegenConfig } GraphQL code generation config.\n */\nexport const getGraphqlCodegenConfig: (nxLibPath: string, gqlFilePaths?: string[]) => CodegenConfig = (\n nxLibPath: string,\n gqlFilePaths?: string[]\n) => {\n const internalSchemaFilePath = join(\n __dirname,\n \"..\",\n \"..\",\n \"..\",\n \"..\",\n \"libs\",\n \"api\",\n \"internal-gql-schema\",\n \"generated\",\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 // Adds a / to the end of the path to make gql client-preset happy - also on Windows\n const generatedGqlOutputFolder = join(nxLibPath, \"src\", \"generated\", \"graphql-api\") + \"/\";\n if (existsSync(generatedGqlOutputFolder)) {\n rmSync(generatedGqlOutputFolder, { recursive: true });\n // eslint-disable-next-line no-console\n console.log(`Cleanup path: ${generatedGqlOutputFolder}`);\n }\n const documents =\n gqlFilePaths && gqlFilePaths.length > 0 ? gqlFilePaths : [join(nxLibPath, \"src\", \"**\", \"*.graphql\")];\n if (!gqlFilePaths) {\n documents.push(join(`!${nxLibPath}`, \"src\", \"**\", \"*-manager.graphql\"));\n }\n\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 PhoneNumber: \"string\",\n EmailAddress: \"string\",\n Currency: \"string\",\n Url: \"string\",\n },\n namingConvention: {\n typeNames: \"keep\",\n enumValues: \"keep\",\n },\n avoidOptionals: {\n field: true,\n inputValue: false,\n object: true,\n defaultValue: true,\n },\n },\n presetConfig: {\n fragmentMasking: { unmaskFunctionName: \"getFragmentData\" },\n noExport: true,\n avoidOptionals: {\n field: true,\n inputValue: false,\n object: true,\n defaultValue: true,\n },\n noNamespaces: true,\n namingConvention: {\n typeNames: \"keep\",\n enumValues: \"keep\",\n },\n },\n };\n\n return {\n schema: \"\",\n ignoreNoDocuments: true, // for better experience with the watcher\n generates,\n };\n};\n"]}
|