@trackunit/iris-app-webpack-plugin 1.0.6 → 1.0.9

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
@@ -1,7 +1,27 @@
1
- # Changelog
1
+ ## 1.0.9 (2025-02-03)
2
2
 
3
- This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
3
+ ### 🧱 Updated Dependencies
4
4
 
5
+ - Updated iris-app-api to 1.0.8
6
+
7
+ ## 1.0.8 (2025-01-30)
8
+
9
+ ### 🧱 Updated Dependencies
10
+
11
+ - Updated iris-app-api to 1.0.7
12
+
13
+ ## 1.0.7 (2025-01-30)
14
+
15
+ ### 🧱 Updated Dependencies
16
+
17
+ - Updated iris-app-api to 1.0.6
18
+
19
+
20
+ ## [1.0.7](https://github.com/Trackunit/manager/compare/iris-app-webpack-plugin/1.0.6...iris-app-webpack-plugin/1.0.7) (2025-01-31)
21
+
22
+ ### Dependency Updates
23
+
24
+ * `iris-app-api` updated to version `1.0.6`
5
25
  ## [1.0.6](https://github.com/Trackunit/manager/compare/iris-app-webpack-plugin/1.0.5...iris-app-webpack-plugin/1.0.6) (2025-01-29)
6
26
 
7
27
  ### Dependency Updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-webpack-plugin",
3
- "version": "1.0.6",
3
+ "version": "1.0.9",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -9,7 +9,8 @@
9
9
  "dependencies": {
10
10
  "csp-header": "^5.2.1",
11
11
  "webpack": "5.97.1",
12
- "@trackunit/iris-app-api": "^1.0.5"
12
+ "@trackunit/iris-app-api": "1.0.8",
13
+ "tslib": "^2.6.2"
13
14
  },
14
15
  "types": "./src/index.d.ts",
15
16
  "main": "./src/index.js",
@@ -12,9 +12,7 @@ const irisAppTranslationUtils_1 = require("./irisAppTranslationUtils");
12
12
  *
13
13
  * @returns {CustomFieldDefinition[]} the updated custom field definitions array
14
14
  */
15
- const updateCustomFields = (customFieldDefinitions, appSrc
16
- // eslint-disable-next-line sonarjs/cognitive-complexity
17
- ) => {
15
+ const updateCustomFields = (customFieldDefinitions, appSrc) => {
18
16
  if (!customFieldDefinitions || !appSrc) {
19
17
  return [];
20
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"customFieldUtil.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-webpack-plugin/src/lib/customFieldUtil.ts"],"names":[],"mappings":";;;AAAA,0DAKiC;AACjC,qCAA+B;AAC/B,iDAA0C;AAC1C,uEAAgG;AAEhG;;;;;;GAMG;AACI,MAAM,kBAAkB,GAAG,CAChC,sBAAgD,EAChD,MAAe;AACf,wDAAwD;EAC/B,EAAE;IAC3B,IAAI,CAAC,sBAAsB,IAAI,CAAC,MAAM,EAAE,CAAC;QACvC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,sBAAsB,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE;QACrD,IAAI,IAAA,4CAA6B,EAAC,qBAAqB,CAAC,YAAY,CAAC,EAAE,CAAC;YACtE,MAAM,OAAO,GAAG,qBAAqB,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;YACtG,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,IAAA,uBAAQ,EACN,wGAAwG,qBAAqB,CAAC,GAAG,EAAE,CACpI,CAAC;gBACF,IAAA,cAAI,EAAC,CAAC,CAAC,CAAC;YACV,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG,IAAA,uDAA6B,EAAC,qBAAqB,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC/F,MAAM,YAAY,GAAG,IAAA,uDAA6B,EAAC,qBAAqB,CAAC,YAAY,CAAC,WAAW,EAAE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IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YACzE,MAAM,YAAY,GAAgC;gBAChD;oBACE,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,IAAA,8CAAoB,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM;oBACxD,WAAW,EAAE,IAAA,8CAAoB,EAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;iBACjF;aACF,CAAC;YAEF,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBACtB,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;oBACtB,YAAY,CAAC,IAAI,CAAC;wBAChB,QAAQ;wBACR,+DAA+D;wBAC/D,KAAK,EAAE,IAAA,8CAAoB,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAE,CAAC,CAAC,CAAC,MAAM;wBAChE,WAAW,EAAE,IAAA,8CAAoB,EAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY;qBACxF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,CAAC,CAAC;YACH,qBAAqB,CAAC,YAAY,GAAG,YAAY,CAAC;QACpD,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,sBAAsB,CAAC;AAChC,CAAC,CAAC;AA1EW,QAAA,kBAAkB,sBA0E7B","sourcesContent":["import {\n CustomFieldDefinition,\n CustomFieldTranslationArray,\n isCustomFieldTranslationArray,\n TranslationLanguageKeys,\n} from \"@trackunit/iris-app-api\";\nimport { exit } from \"process\";\nimport { logError } from \"./consoleUtils\";\nimport { convertTranslationKeyIfNeeded, isTranslationsObject } from \"./irisAppTranslationUtils\";\n\n/**\n * Updates the custom field definitions with the given app source directory.\n * If the custom field definitions are not provided, it returns an empty array.\n * If the app source directory is not provided, it returns the custom field definitions.\n *\n * @returns {CustomFieldDefinition[]} the updated custom field definitions array\n */\nexport const updateCustomFields = (\n customFieldDefinitions?: CustomFieldDefinition[],\n appSrc?: string\n // eslint-disable-next-line sonarjs/cognitive-complexity\n): CustomFieldDefinition[] => {\n if (!customFieldDefinitions || !appSrc) {\n return [];\n }\n customFieldDefinitions.forEach(customFieldDefinition => {\n if (isCustomFieldTranslationArray(customFieldDefinition.translations)) {\n const foundEn = customFieldDefinition.translations.find(translation => translation.language === \"en\");\n if (!foundEn) {\n logError(\n ` ✨ Translation not found for language \"en\" you must supply the english translation for custom field: ${customFieldDefinition.key}`\n );\n exit(1);\n }\n } else {\n const titles = convertTranslationKeyIfNeeded(customFieldDefinition.translations.title, appSrc);\n const descriptions = convertTranslationKeyIfNeeded(customFieldDefinition.translations.description, appSrc);\n\n if (!titles || !descriptions) {\n logError(\n ` ✨ Translation not found for language \"en\" you must supply the english translation for custom field: ${customFieldDefinition.key}`\n );\n exit(1);\n }\n const titleKeys = isTranslationsObject(titles)\n ? // eslint-disable-next-line no-autofix/local-rules/prefer-custom-object-keys\n Object.keys(titles).filter((key): key is TranslationLanguageKeys => key in titles)\n : null;\n\n if (titleKeys !== null && titleKeys.indexOf(\"en\") === -1) {\n logError(\n ` ✨ Translation not found 'title' for language \"en\" you must supply the english translation for custom field: ${customFieldDefinition.key}`\n );\n exit(1);\n }\n\n const descriptionKeys = isTranslationsObject(descriptions)\n ? // eslint-disable-next-line no-autofix/local-rules/prefer-custom-object-keys\n Object.keys(descriptions).filter((key): key is TranslationLanguageKeys => key in descriptions)\n : null;\n\n if (descriptionKeys !== null && descriptionKeys.indexOf(\"en\") === -1) {\n logError(\n ` ✨ Translation not found 'description' for language \"en\" you must supply the english translation for custom field: ${customFieldDefinition.key}`\n );\n exit(1);\n }\n\n const keys = new Set([...(titleKeys || []), ...(descriptionKeys || [])]);\n const translations: CustomFieldTranslationArray = [\n {\n language: \"en\",\n title: isTranslationsObject(titles) ? titles.en : titles,\n description: isTranslationsObject(descriptions) ? descriptions.en : descriptions,\n },\n ];\n\n keys.forEach(language => {\n if (language !== \"en\") {\n translations.push({\n language,\n // eslint-disable-next-line local-rules/no-typescript-assertion\n title: isTranslationsObject(titles) ? titles[language]! : titles,\n description: isTranslationsObject(descriptions) ? descriptions[language] : descriptions,\n });\n }\n });\n customFieldDefinition.translations = translations;\n }\n });\n return customFieldDefinitions;\n};\n"]}
1
+ {"version":3,"file":"customFieldUtil.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-webpack-plugin/src/lib/customFieldUtil.ts"],"names":[],"mappings":";;;AAAA,0DAKiC;AACjC,qCAA+B;AAC/B,iDAA0C;AAC1C,uEAAgG;AAEhG;;;;;;GAMG;AACI,MAAM,kBAAkB,GAAG,CAChC,sBAAgD,EAChD,MAAe,EACU,EAAE;IAC3B,IAAI,CAAC,sBAAsB,IAAI,CAAC,MAAM,EAAE,CAAC;QACvC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,sBAAsB,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE;QACrD,IAAI,IAAA,4CAA6B,EAAC,qBAAqB,CAAC,YAAY,CAAC,EAAE,CAAC;YACtE,MAAM,OAAO,GAAG,qBAAqB,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;YACtG,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,IAAA,uBAAQ,EACN,wGAAwG,qBAAqB,CAAC,GAAG,EAAE,CACpI,CAAC;gBACF,IAAA,cAAI,EAAC,CAAC,CAAC,CAAC;YACV,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG,IAAA,uDAA6B,EAAC,qBAAqB,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC/F,MAAM,YAAY,GAAG,IAAA,uDAA6B,EAAC,qBAAqB,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAA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,CAAC,CAAC,CAAC,CAAC;YACzE,MAAM,YAAY,GAAgC;gBAChD;oBACE,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,IAAA,8CAAoB,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM;oBACxD,WAAW,EAAE,IAAA,8CAAoB,EAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;iBACjF;aACF,CAAC;YAEF,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBACtB,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;oBACtB,YAAY,CAAC,IAAI,CAAC;wBAChB,QAAQ;wBACR,+DAA+D;wBAC/D,KAAK,EAAE,IAAA,8CAAoB,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAE,CAAC,CAAC,CAAC,MAAM;wBAChE,WAAW,EAAE,IAAA,8CAAoB,EAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY;qBACxF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,CAAC,CAAC;YACH,qBAAqB,CAAC,YAAY,GAAG,YAAY,CAAC;QACpD,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,sBAAsB,CAAC;AAChC,CAAC,CAAC;AAzEW,QAAA,kBAAkB,sBAyE7B","sourcesContent":["import {\n CustomFieldDefinition,\n CustomFieldTranslationArray,\n isCustomFieldTranslationArray,\n TranslationLanguageKeys,\n} from \"@trackunit/iris-app-api\";\nimport { exit } from \"process\";\nimport { logError } from \"./consoleUtils\";\nimport { convertTranslationKeyIfNeeded, isTranslationsObject } from \"./irisAppTranslationUtils\";\n\n/**\n * Updates the custom field definitions with the given app source directory.\n * If the custom field definitions are not provided, it returns an empty array.\n * If the app source directory is not provided, it returns the custom field definitions.\n *\n * @returns {CustomFieldDefinition[]} the updated custom field definitions array\n */\nexport const updateCustomFields = (\n customFieldDefinitions?: CustomFieldDefinition[],\n appSrc?: string\n): CustomFieldDefinition[] => {\n if (!customFieldDefinitions || !appSrc) {\n return [];\n }\n customFieldDefinitions.forEach(customFieldDefinition => {\n if (isCustomFieldTranslationArray(customFieldDefinition.translations)) {\n const foundEn = customFieldDefinition.translations.find(translation => translation.language === \"en\");\n if (!foundEn) {\n logError(\n ` ✨ Translation not found for language \"en\" you must supply the english translation for custom field: ${customFieldDefinition.key}`\n );\n exit(1);\n }\n } else {\n const titles = convertTranslationKeyIfNeeded(customFieldDefinition.translations.title, appSrc);\n const descriptions = convertTranslationKeyIfNeeded(customFieldDefinition.translations.description, appSrc);\n\n if (!titles || !descriptions) {\n logError(\n ` ✨ Translation not found for language \"en\" you must supply the english translation for custom field: ${customFieldDefinition.key}`\n );\n exit(1);\n }\n const titleKeys = isTranslationsObject(titles)\n ? // eslint-disable-next-line no-autofix/local-rules/prefer-custom-object-keys\n Object.keys(titles).filter((key): key is TranslationLanguageKeys => key in titles)\n : null;\n\n if (titleKeys !== null && titleKeys.indexOf(\"en\") === -1) {\n logError(\n ` ✨ Translation not found 'title' for language \"en\" you must supply the english translation for custom field: ${customFieldDefinition.key}`\n );\n exit(1);\n }\n\n const descriptionKeys = isTranslationsObject(descriptions)\n ? // eslint-disable-next-line no-autofix/local-rules/prefer-custom-object-keys\n Object.keys(descriptions).filter((key): key is TranslationLanguageKeys => key in descriptions)\n : null;\n\n if (descriptionKeys !== null && descriptionKeys.indexOf(\"en\") === -1) {\n logError(\n ` ✨ Translation not found 'description' for language \"en\" you must supply the english translation for custom field: ${customFieldDefinition.key}`\n );\n exit(1);\n }\n\n const keys = new Set([...(titleKeys || []), ...(descriptionKeys || [])]);\n const translations: CustomFieldTranslationArray = [\n {\n language: \"en\",\n title: isTranslationsObject(titles) ? titles.en : titles,\n description: isTranslationsObject(descriptions) ? descriptions.en : descriptions,\n },\n ];\n\n keys.forEach(language => {\n if (language !== \"en\") {\n translations.push({\n language,\n // eslint-disable-next-line local-rules/no-typescript-assertion\n title: isTranslationsObject(titles) ? titles[language]! : titles,\n description: isTranslationsObject(descriptions) ? descriptions[language] : descriptions,\n });\n }\n });\n customFieldDefinition.translations = translations;\n }\n });\n return customFieldDefinitions;\n};\n"]}