@c8y/devkit 1019.0.3

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.
Files changed (196) hide show
  1. package/README.md +13 -0
  2. package/dist/builders.json +29 -0
  3. package/dist/index.d.ts +6 -0
  4. package/dist/index.js +11 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/options.d.ts +2 -0
  7. package/dist/options.js +6 -0
  8. package/dist/options.js.map +1 -0
  9. package/dist/src/builders/BuilderOptions.d.ts +90 -0
  10. package/dist/src/builders/BuilderOptions.js +3 -0
  11. package/dist/src/builders/BuilderOptions.js.map +1 -0
  12. package/dist/src/builders/browser/index.d.ts +2 -0
  13. package/dist/src/builders/browser/index.js +17 -0
  14. package/dist/src/builders/browser/index.js.map +1 -0
  15. package/dist/src/builders/browser/schema.json +606 -0
  16. package/dist/src/builders/compile-i18n/compile-i18n-builder.d.ts +5 -0
  17. package/dist/src/builders/compile-i18n/compile-i18n-builder.js +88 -0
  18. package/dist/src/builders/compile-i18n/compile-i18n-builder.js.map +1 -0
  19. package/dist/src/builders/compile-i18n/schema.json +24 -0
  20. package/dist/src/builders/create-schema.d.ts +1 -0
  21. package/dist/src/builders/create-schema.js +32 -0
  22. package/dist/src/builders/create-schema.js.map +1 -0
  23. package/dist/src/builders/deploy/Deploy.model.d.ts +30 -0
  24. package/dist/src/builders/deploy/Deploy.model.js +8 -0
  25. package/dist/src/builders/deploy/Deploy.model.js.map +1 -0
  26. package/dist/src/builders/deploy/app-as-zip-file.d.ts +8 -0
  27. package/dist/src/builders/deploy/app-as-zip-file.js +74 -0
  28. package/dist/src/builders/deploy/app-as-zip-file.js.map +1 -0
  29. package/dist/src/builders/deploy/build-and-zip-app.d.ts +10 -0
  30. package/dist/src/builders/deploy/build-and-zip-app.js +105 -0
  31. package/dist/src/builders/deploy/build-and-zip-app.js.map +1 -0
  32. package/dist/src/builders/deploy/deploy-builder.d.ts +5 -0
  33. package/dist/src/builders/deploy/deploy-builder.js +268 -0
  34. package/dist/src/builders/deploy/deploy-builder.js.map +1 -0
  35. package/dist/src/builders/deploy/helpers.d.ts +25 -0
  36. package/dist/src/builders/deploy/helpers.js +45 -0
  37. package/dist/src/builders/deploy/helpers.js.map +1 -0
  38. package/dist/src/builders/deploy/schema.json +42 -0
  39. package/dist/src/builders/dev-server/index.d.ts +2 -0
  40. package/dist/src/builders/dev-server/index.js +67 -0
  41. package/dist/src/builders/dev-server/index.js.map +1 -0
  42. package/dist/src/builders/dev-server/schema.json +120 -0
  43. package/dist/src/builders/extract-i18n/extract-i18n-builder.d.ts +5 -0
  44. package/dist/src/builders/extract-i18n/extract-i18n-builder.js +126 -0
  45. package/dist/src/builders/extract-i18n/extract-i18n-builder.js.map +1 -0
  46. package/dist/src/builders/extract-i18n/schema.json +30 -0
  47. package/dist/src/options.d.ts +82 -0
  48. package/dist/src/options.js +98 -0
  49. package/dist/src/options.js.map +1 -0
  50. package/dist/src/schematics/collection.json +9 -0
  51. package/dist/src/schematics/ng-add/configs/angular-json.d.ts +28 -0
  52. package/dist/src/schematics/ng-add/configs/angular-json.js +93 -0
  53. package/dist/src/schematics/ng-add/configs/angular-json.js.map +1 -0
  54. package/dist/src/schematics/ng-add/configs/app-module.d.ts +3 -0
  55. package/dist/src/schematics/ng-add/configs/app-module.js +13 -0
  56. package/dist/src/schematics/ng-add/configs/app-module.js.map +1 -0
  57. package/dist/src/schematics/ng-add/configs/app-routing.d.ts +2 -0
  58. package/dist/src/schematics/ng-add/configs/app-routing.js +16 -0
  59. package/dist/src/schematics/ng-add/configs/app-routing.js.map +1 -0
  60. package/dist/src/schematics/ng-add/configs/index-html.d.ts +2 -0
  61. package/dist/src/schematics/ng-add/configs/index-html.js +15 -0
  62. package/dist/src/schematics/ng-add/configs/index-html.js.map +1 -0
  63. package/dist/src/schematics/ng-add/configs/index.d.ts +2 -0
  64. package/dist/src/schematics/ng-add/configs/index.js +37 -0
  65. package/dist/src/schematics/ng-add/configs/index.js.map +1 -0
  66. package/dist/src/schematics/ng-add/configs/main.d.ts +2 -0
  67. package/dist/src/schematics/ng-add/configs/main.js +30 -0
  68. package/dist/src/schematics/ng-add/configs/main.js.map +1 -0
  69. package/dist/src/schematics/ng-add/configs/ng1.d.ts +3 -0
  70. package/dist/src/schematics/ng-add/configs/ng1.js +13 -0
  71. package/dist/src/schematics/ng-add/configs/ng1.js.map +1 -0
  72. package/dist/src/schematics/ng-add/configs/package-json.d.ts +17 -0
  73. package/dist/src/schematics/ng-add/configs/package-json.js +67 -0
  74. package/dist/src/schematics/ng-add/configs/package-json.js.map +1 -0
  75. package/dist/src/schematics/ng-add/configs/translation.d.ts +2 -0
  76. package/dist/src/schematics/ng-add/configs/translation.js +36 -0
  77. package/dist/src/schematics/ng-add/configs/translation.js.map +1 -0
  78. package/dist/src/schematics/ng-add/configs/tsconfig-app-json.d.ts +2 -0
  79. package/dist/src/schematics/ng-add/configs/tsconfig-app-json.js +21 -0
  80. package/dist/src/schematics/ng-add/configs/tsconfig-app-json.js.map +1 -0
  81. package/dist/src/schematics/ng-add/configs/tsconfig-json.d.ts +2 -0
  82. package/dist/src/schematics/ng-add/configs/tsconfig-json.js +19 -0
  83. package/dist/src/schematics/ng-add/configs/tsconfig-json.js.map +1 -0
  84. package/dist/src/schematics/ng-add/index.d.ts +4 -0
  85. package/dist/src/schematics/ng-add/index.js +93 -0
  86. package/dist/src/schematics/ng-add/index.js.map +1 -0
  87. package/dist/src/schematics/ng-add/model.d.ts +19 -0
  88. package/dist/src/schematics/ng-add/model.js +3 -0
  89. package/dist/src/schematics/ng-add/model.js.map +1 -0
  90. package/dist/src/schematics/ng-add/ng-add.json +18 -0
  91. package/dist/src/schematics/ng-add/utils.d.ts +13 -0
  92. package/dist/src/schematics/ng-add/utils.js +32 -0
  93. package/dist/src/schematics/ng-add/utils.js.map +1 -0
  94. package/dist/src/utils/locale-compiler.d.ts +48 -0
  95. package/dist/src/utils/locale-compiler.js +83 -0
  96. package/dist/src/utils/locale-compiler.js.map +1 -0
  97. package/dist/src/utils/locale-json-paths.d.ts +19 -0
  98. package/dist/src/utils/locale-json-paths.js +63 -0
  99. package/dist/src/utils/locale-json-paths.js.map +1 -0
  100. package/dist/src/utils/locale-utils.d.ts +24 -0
  101. package/dist/src/utils/locale-utils.js +104 -0
  102. package/dist/src/utils/locale-utils.js.map +1 -0
  103. package/dist/src/utils/package-config.d.ts +1 -0
  104. package/dist/src/utils/package-config.js +13 -0
  105. package/dist/src/utils/package-config.js.map +1 -0
  106. package/dist/src/webpack/ApplicationOptions.d.ts +344 -0
  107. package/dist/src/webpack/ApplicationOptions.js +3 -0
  108. package/dist/src/webpack/ApplicationOptions.js.map +1 -0
  109. package/dist/src/webpack/BuildDefaults.d.ts +10 -0
  110. package/dist/src/webpack/BuildDefaults.js +15 -0
  111. package/dist/src/webpack/BuildDefaults.js.map +1 -0
  112. package/dist/src/webpack/EnvironmentOptions.d.ts +132 -0
  113. package/dist/src/webpack/EnvironmentOptions.js +15 -0
  114. package/dist/src/webpack/EnvironmentOptions.js.map +1 -0
  115. package/dist/src/webpack/config/babel.d.ts +2 -0
  116. package/dist/src/webpack/config/babel.js +65 -0
  117. package/dist/src/webpack/config/babel.js.map +1 -0
  118. package/dist/src/webpack/config/base.d.ts +27 -0
  119. package/dist/src/webpack/config/base.js +125 -0
  120. package/dist/src/webpack/config/base.js.map +1 -0
  121. package/dist/src/webpack/config/development.d.ts +4 -0
  122. package/dist/src/webpack/config/development.js +37 -0
  123. package/dist/src/webpack/config/development.js.map +1 -0
  124. package/dist/src/webpack/config/extra.d.ts +3 -0
  125. package/dist/src/webpack/config/extra.js +24 -0
  126. package/dist/src/webpack/config/extra.js.map +1 -0
  127. package/dist/src/webpack/config/favicon.d.ts +2 -0
  128. package/dist/src/webpack/config/favicon.js +20 -0
  129. package/dist/src/webpack/config/favicon.js.map +1 -0
  130. package/dist/src/webpack/config/federation.d.ts +3 -0
  131. package/dist/src/webpack/config/federation.js +66 -0
  132. package/dist/src/webpack/config/federation.js.map +1 -0
  133. package/dist/src/webpack/config/legacy.d.ts +2 -0
  134. package/dist/src/webpack/config/legacy.js +72 -0
  135. package/dist/src/webpack/config/legacy.js.map +1 -0
  136. package/dist/src/webpack/config/plugin.d.ts +5 -0
  137. package/dist/src/webpack/config/plugin.js +89 -0
  138. package/dist/src/webpack/config/plugin.js.map +1 -0
  139. package/dist/src/webpack/config/production.d.ts +3 -0
  140. package/dist/src/webpack/config/production.js +30 -0
  141. package/dist/src/webpack/config/production.js.map +1 -0
  142. package/dist/src/webpack/config/styles.d.ts +3 -0
  143. package/dist/src/webpack/config/styles.js +54 -0
  144. package/dist/src/webpack/config/styles.js.map +1 -0
  145. package/dist/src/webpack/config/translation.d.ts +2 -0
  146. package/dist/src/webpack/config/translation.js +23 -0
  147. package/dist/src/webpack/config/translation.js.map +1 -0
  148. package/dist/src/webpack/loaders/loader-data.d.ts +1 -0
  149. package/dist/src/webpack/loaders/loader-data.js +53 -0
  150. package/dist/src/webpack/loaders/loader-data.js.map +1 -0
  151. package/dist/src/webpack/loaders/loader-less.d.ts +1 -0
  152. package/dist/src/webpack/loaders/loader-less.js +23 -0
  153. package/dist/src/webpack/loaders/loader-less.js.map +1 -0
  154. package/dist/src/webpack/loaders/loader-manifest.d.ts +1 -0
  155. package/dist/src/webpack/loaders/loader-manifest.js +88 -0
  156. package/dist/src/webpack/loaders/loader-manifest.js.map +1 -0
  157. package/dist/src/webpack/loaders/loader-ngtemplate.d.ts +1 -0
  158. package/dist/src/webpack/loaders/loader-ngtemplate.js +16 -0
  159. package/dist/src/webpack/loaders/loader-ngtemplate.js.map +1 -0
  160. package/dist/src/webpack/loaders/loader-pluginpath.d.ts +1 -0
  161. package/dist/src/webpack/loaders/loader-pluginpath.js +10 -0
  162. package/dist/src/webpack/loaders/loader-pluginpath.js.map +1 -0
  163. package/dist/src/webpack/loaders/loader-po.d.ts +3 -0
  164. package/dist/src/webpack/loaders/loader-po.js +9 -0
  165. package/dist/src/webpack/loaders/loader-po.js.map +1 -0
  166. package/dist/src/webpack/plugin/index-content.d.ts +2 -0
  167. package/dist/src/webpack/plugin/index-content.js +113 -0
  168. package/dist/src/webpack/plugin/index-content.js.map +1 -0
  169. package/dist/src/webpack/plugin/locales.d.ts +6 -0
  170. package/dist/src/webpack/plugin/locales.js +746 -0
  171. package/dist/src/webpack/plugin/locales.js.map +1 -0
  172. package/dist/src/webpack/plugin/plugin.d.ts +259 -0
  173. package/dist/src/webpack/plugin/plugin.js +286 -0
  174. package/dist/src/webpack/plugin/plugin.js.map +1 -0
  175. package/dist/src/webpack/plugin/translation-aggregation-plugin.d.ts +80 -0
  176. package/dist/src/webpack/plugin/translation-aggregation-plugin.js +152 -0
  177. package/dist/src/webpack/plugin/translation-aggregation-plugin.js.map +1 -0
  178. package/dist/src/webpack/plugin/translation-data-store.d.ts +27 -0
  179. package/dist/src/webpack/plugin/translation-data-store.js +37 -0
  180. package/dist/src/webpack/plugin/translation-data-store.js.map +1 -0
  181. package/dist/src/webpack/utils/federationUtils.d.ts +26 -0
  182. package/dist/src/webpack/utils/federationUtils.js +234 -0
  183. package/dist/src/webpack/utils/federationUtils.js.map +1 -0
  184. package/dist/src/webpack/utils/helpers.d.ts +45 -0
  185. package/dist/src/webpack/utils/helpers.js +137 -0
  186. package/dist/src/webpack/utils/helpers.js.map +1 -0
  187. package/dist/src/webpack/utils/index.d.ts +1 -0
  188. package/dist/src/webpack/utils/index.js +5 -0
  189. package/dist/src/webpack/utils/index.js.map +1 -0
  190. package/dist/src/webpack/utils/legacy-manifest-resolver.d.ts +4 -0
  191. package/dist/src/webpack/utils/legacy-manifest-resolver.js +27 -0
  192. package/dist/src/webpack/utils/legacy-manifest-resolver.js.map +1 -0
  193. package/dist/src/webpack/utils/proxy.d.ts +2 -0
  194. package/dist/src/webpack/utils/proxy.js +39 -0
  195. package/dist/src/webpack/utils/proxy.js.map +1 -0
  196. package/package.json +99 -0
@@ -0,0 +1,19 @@
1
+ export interface Application {
2
+ name: string;
3
+ contextPath: string;
4
+ [key: string]: any;
5
+ }
6
+ export interface CumulocityNgAddOptions {
7
+ /** Name of the project. */
8
+ project: string;
9
+ /** Application metadata */
10
+ application: Application;
11
+ }
12
+ export type ApplicationSetup = {
13
+ ng1Modules?: string;
14
+ appModule?: string;
15
+ projectInfo: {
16
+ version: string;
17
+ cdkVersion: string;
18
+ };
19
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../src/schematics/ng-add/model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "c8y-ng-add",
4
+ "title": "Cumulocity schematic",
5
+ "type": "object",
6
+ "properties": {
7
+ "project": {
8
+ "type": "string",
9
+ "description": "The name of the project.",
10
+ "$default": {
11
+ "$source": "projectName"
12
+ }
13
+ },
14
+ "application": {
15
+ "type": "string"
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,13 @@
1
+ import { Tree } from '@angular-devkit/schematics';
2
+ /**
3
+ * Sorts the keys of the given object.
4
+ * @param obj - The object whose keys need to be sorted.
5
+ * @returns A new object instance with sorted keys.
6
+ */
7
+ export declare function sortObjectByKeys(obj: Record<string, string>): Record<string, string>;
8
+ /**
9
+ * Deletes a file or set of files from the tree based on the specified path pattern.
10
+ * @param tree - The Tree representing the current state of the source files.
11
+ * @param path - The path pattern to match files that need to be deleted.
12
+ */
13
+ export declare function deleteFile(tree: Tree, path: string): void;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteFile = exports.sortObjectByKeys = void 0;
4
+ /**
5
+ * Sorts the keys of the given object.
6
+ * @param obj - The object whose keys need to be sorted.
7
+ * @returns A new object instance with sorted keys.
8
+ */
9
+ function sortObjectByKeys(obj) {
10
+ return Object.keys(obj)
11
+ .sort()
12
+ .reduce((result, key) => {
13
+ result[key] = obj[key];
14
+ return result;
15
+ }, {});
16
+ }
17
+ exports.sortObjectByKeys = sortObjectByKeys;
18
+ /**
19
+ * Deletes a file or set of files from the tree based on the specified path pattern.
20
+ * @param tree - The Tree representing the current state of the source files.
21
+ * @param path - The path pattern to match files that need to be deleted.
22
+ */
23
+ function deleteFile(tree, path) {
24
+ const fileToDelete = new RegExp(path);
25
+ tree.visit(file => {
26
+ if (fileToDelete.test(file)) {
27
+ tree.delete(file);
28
+ }
29
+ });
30
+ }
31
+ exports.deleteFile = deleteFile;
32
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/schematics/ng-add/utils.ts"],"names":[],"mappings":";;;AACA;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,GAA2B;IAC1D,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;SACpB,IAAI,EAAE;SACN,MAAM,CACL,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACd,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,EAA4B,CAC7B,CAAC;AACN,CAAC;AAVD,4CAUC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,IAAU,EAAE,IAAY;IACjD,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QAChB,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SACnB;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,gCAOC"}
@@ -0,0 +1,48 @@
1
+ import * as pofile from 'pofile';
2
+ export type CompiledPO = {
3
+ language: string;
4
+ json: string;
5
+ };
6
+ type POFile = pofile.PO;
7
+ export declare class LocaleCompiler {
8
+ /**
9
+ * Stores .po files grouped by language.
10
+ */
11
+ groupedPos: {
12
+ [key: string]: POFile;
13
+ };
14
+ /**
15
+ * Parses .po file content and adds it to the grouped localization files.
16
+ * @param content The .po file content as a string.
17
+ * @param path The path to the .po file.
18
+ */
19
+ loadPo(content: string, path: string): void;
20
+ /**
21
+ * Compiles all grouped .po files into their respective JSON format.
22
+ * @returns An array of compiled .po files with their associated language and JSON content.
23
+ */
24
+ compile(): CompiledPO[];
25
+ /**
26
+ * Combines items from source .po file into destination items array.
27
+ * @param destItems - The destination items array to merge into.
28
+ * @param srcItems - The source items array to merge from.
29
+ * @param srcPath - The path to the source .po file.
30
+ * @returns An array of combined PO file items.
31
+ */
32
+ private getCombinedItems;
33
+ /**
34
+ * Adds unique items from the source array to the destination array without duplicating existing entries.
35
+ * @param destItems - The destination items array.
36
+ * @param srcItems - The source items array.
37
+ * @returns An array containing all unique items from both arrays.
38
+ */
39
+ private addUniqueAndIgnoreDuplicates;
40
+ /**
41
+ * Adds items from the source array to the destination array, overwriting any duplicates.
42
+ * @param destItems - The destination items array.
43
+ * @param srcItems - The source items array.
44
+ * @returns An array containing unique items from the source and any non-duplicated items from the destination.
45
+ */
46
+ private addUniqueAndOverwriteDuplicates;
47
+ }
48
+ export {};
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocaleCompiler = void 0;
4
+ const pofile = require("pofile");
5
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6
+ // @ts-ignore
7
+ const angular_gettext_tools_1 = require("angular-gettext-tools");
8
+ class LocaleCompiler {
9
+ constructor() {
10
+ /**
11
+ * Stores .po files grouped by language.
12
+ */
13
+ this.groupedPos = {};
14
+ }
15
+ /**
16
+ * Parses .po file content and adds it to the grouped localization files.
17
+ * @param content The .po file content as a string.
18
+ * @param path The path to the .po file.
19
+ */
20
+ loadPo(content, path) {
21
+ const po = pofile.parse(content);
22
+ const grouped = this.groupedPos;
23
+ const { Language } = po.headers;
24
+ if (!Language) {
25
+ return;
26
+ }
27
+ if (!grouped[Language]) {
28
+ grouped[Language] = new pofile();
29
+ }
30
+ const finalPo = grouped[Language];
31
+ Object.assign(finalPo.headers, po.headers);
32
+ finalPo.items = this.getCombinedItems(finalPo.items, po.items, path);
33
+ }
34
+ /**
35
+ * Compiles all grouped .po files into their respective JSON format.
36
+ * @returns An array of compiled .po files with their associated language and JSON content.
37
+ */
38
+ compile() {
39
+ const grouped = this.groupedPos;
40
+ return Object.keys(grouped).map((po) => ({
41
+ language: po,
42
+ json: new angular_gettext_tools_1.Compiler({ format: 'json' }).convertPo([grouped[po].toString()])
43
+ }));
44
+ }
45
+ /**
46
+ * Combines items from source .po file into destination items array.
47
+ * @param destItems - The destination items array to merge into.
48
+ * @param srcItems - The source items array to merge from.
49
+ * @param srcPath - The path to the source .po file.
50
+ * @returns An array of combined PO file items.
51
+ */
52
+ getCombinedItems(destItems, srcItems, srcPath) {
53
+ const fromNodeModules = /node_modules\/@c8y/.test(srcPath);
54
+ if (fromNodeModules) {
55
+ return this.addUniqueAndIgnoreDuplicates(destItems, srcItems);
56
+ }
57
+ else {
58
+ return this.addUniqueAndOverwriteDuplicates(destItems, srcItems);
59
+ }
60
+ }
61
+ /**
62
+ * Adds unique items from the source array to the destination array without duplicating existing entries.
63
+ * @param destItems - The destination items array.
64
+ * @param srcItems - The source items array.
65
+ * @returns An array containing all unique items from both arrays.
66
+ */
67
+ addUniqueAndIgnoreDuplicates(destItems, srcItems) {
68
+ const uniqueSrcItems = srcItems.filter(item => !destItems.some(({ msgid }) => msgid === item.msgid));
69
+ return [...destItems, ...uniqueSrcItems];
70
+ }
71
+ /**
72
+ * Adds items from the source array to the destination array, overwriting any duplicates.
73
+ * @param destItems - The destination items array.
74
+ * @param srcItems - The source items array.
75
+ * @returns An array containing unique items from the source and any non-duplicated items from the destination.
76
+ */
77
+ addUniqueAndOverwriteDuplicates(destItems, srcItems) {
78
+ const uniqueDestItems = destItems.filter(item => !srcItems.some(({ msgid }) => msgid === item.msgid));
79
+ return [...uniqueDestItems, ...srcItems];
80
+ }
81
+ }
82
+ exports.LocaleCompiler = LocaleCompiler;
83
+ //# sourceMappingURL=locale-compiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-compiler.js","sourceRoot":"","sources":["../../../src/utils/locale-compiler.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,6DAA6D;AAC7D,aAAa;AACb,iEAAiD;AAMjD,MAAa,cAAc;IAA3B;QACE;;WAEG;QACH,eAAU,GAEN,EAAE,CAAC;IAiFT,CAAC;IAhFC;;;;OAIG;IACH,MAAM,CAAC,OAAe,EAAE,IAAY;QAClC,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC;QAChC,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO;SACR;QACD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACtB,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAK,MAAc,EAAY,CAAC;SACrD;QAED,MAAM,OAAO,GAAW,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACvE,CAAC;IACD;;;OAGG;IACH,OAAO;QACL,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,EA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FD,wCAuFC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A concatenated string of the keys of the dataTranslate object, separated by pipes,
3
+ * to be used for constructing glob patterns.
4
+ */
5
+ export declare const jsonPathsGlobs: string;
6
+ /**
7
+ * Describes the structure of the JSONPath object used for translation.
8
+ */
9
+ type JsonPath = {
10
+ glob: string;
11
+ matches: (filename: string) => boolean;
12
+ transform: (content: string) => string;
13
+ };
14
+ /**
15
+ * An array of JsonPath objects created for each key in the dataTranslate object.
16
+ * Each object contains methods for matching filenames and transforming file content.
17
+ */
18
+ export declare const jsonPaths: JsonPath[];
19
+ export {};
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.jsonPaths = exports.jsonPathsGlobs = void 0;
4
+ const path_1 = require("path");
5
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6
+ // @ts-ignore
7
+ const jsonPath = require("JSONPath");
8
+ /**
9
+ * A mapping from data category keys to their corresponding JSON paths for translation.
10
+ */
11
+ const dataTranslate = {
12
+ smartrules: [
13
+ '$..label.[input,output,full]',
14
+ '$..description',
15
+ '$..category',
16
+ '$..info',
17
+ '$..paramGroups.[input,output].label',
18
+ '$..paramGroups.[input,output].info',
19
+ '$..paramGroups.[input,output].params.[label,default,info,placeholder]',
20
+ '$..paramGroups.[input,output].params.default.description',
21
+ '$..paramGroups.[input,output].params.stepTypes.[label,default,info,placeholder]',
22
+ '$..paramGroups.[input,output].params.stepTypes.default.description'
23
+ ],
24
+ devicecommands: ['$.name', '$.templates..[name,category]'],
25
+ properties: ['$..title', '$..description'],
26
+ trackers: ['$..description']
27
+ };
28
+ /**
29
+ * Creates a function to generate JavaScript code from JSON content based on specified JSON paths.
30
+ * @param jsonPaths - An array of JSONPath strings to extract strings for translation.
31
+ * @return A function that takes JSON content as a string and returns JavaScript code as a string.
32
+ */
33
+ function createJsFromJson(jsonPaths) {
34
+ return (content) => {
35
+ const obj = JSON.parse(content);
36
+ return jsonPaths.reduce((src, path) => {
37
+ const values = jsonPath.eval(obj, path);
38
+ return (src +
39
+ values
40
+ .filter((v) => typeof v === 'string')
41
+ .map((v) => `gettext('${v}');`)
42
+ .join('\n'));
43
+ }, '');
44
+ };
45
+ }
46
+ const keys = Object.keys(dataTranslate);
47
+ /**
48
+ * A concatenated string of the keys of the dataTranslate object, separated by pipes,
49
+ * to be used for constructing glob patterns.
50
+ */
51
+ exports.jsonPathsGlobs = `(${keys.join('|')})`;
52
+ /**
53
+ * An array of JsonPath objects created for each key in the dataTranslate object.
54
+ * Each object contains methods for matching filenames and transforming file content.
55
+ */
56
+ exports.jsonPaths = keys.map(key => {
57
+ return {
58
+ glob: `${key}/*.json`,
59
+ matches: filename => (0, path_1.basename)((0, path_1.dirname)(filename)) === key,
60
+ transform: createJsFromJson(dataTranslate[key])
61
+ };
62
+ });
63
+ //# sourceMappingURL=locale-json-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-json-paths.js","sourceRoot":"","sources":["../../../src/utils/locale-json-paths.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AACzC,6DAA6D;AAC7D,aAAa;AACb,qCAAqC;AACrC;;GAEG;AACH,MAAM,aAAa,GAAG;IACpB,UAAU,EAAE;QACV,8BAA8B;QAC9B,gBAAgB;QAChB,aAAa;QACb,SAAS;QACT,qCAAqC;QACrC,oCAAoC;QACpC,uEAAuE;QACvE,0DAA0D;QAC1D,iFAAiF;QACjF,oEAAoE;KACrE;IACD,cAAc,EAAE,CAAC,QAAQ,EAAE,8BAA8B,CAAC;IAC1D,UAAU,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAC1C,QAAQ,EAAE,CAAC,gBAAgB,CAAC;CAC7B,CAAC;AACF;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,SAAmB;IAC3C,OAAO,CAAC,OAAe,EAAE,EAAE;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACpC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACxC,OAAO,CACL,GAAG;gBACH,MAAM;qBACH,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;qBACzC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;qBACnC,IAAI,CAAC,IAAI,CAAC,CACd,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AACxC;;;GAGG;AACU,QAAA,cAAc,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AASpD;;;GAGG;AACU,QAAA,SAAS,GAAe,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;IAClD,OAAO;QACL,IAAI,EAAE,GAAG,GAAG,SAAS;QACrB,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAA,eAAQ,EAAC,IAAA,cAAO,EAAC,QAAQ,CAAC,CAAC,KAAK,GAAG;QACxD,SAAS,EAAE,gBAAgB,CAAC,aAAa,CAAC,GAAiC,CAAC,CAAC;KAC9E,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { PO } from 'pofile';
2
+ /**
3
+ * Loads PO objects from specified paths.
4
+ * @param paths An array of directory paths where .po files are located.
5
+ * @returns A Promise that resolves to an array of PO objects.
6
+ */
7
+ export declare function getPoObjects(paths: string[]): Promise<PO[]>;
8
+ /**
9
+ * Retrieves a configured extractor for source files located at the given paths.
10
+ * @param paths An array of paths to the directories containing source files.
11
+ * @returns A Promise that resolves to an instance of Extractor.
12
+ */
13
+ export declare function getExtractor(paths: string[]): Promise<any>;
14
+ /**
15
+ * Creates a new PO object based on the template provided by another PO object.
16
+ * @param po The PO object to use as a template for the new PO object.
17
+ * @returns A new PO object initialized with the headers from the template PO.
18
+ */
19
+ export declare function createNewPo(po: PO): PO;
20
+ /**
21
+ * Creates an extractor that can be used to extract strings from files.
22
+ * @returns An instance of an Extractor.
23
+ */
24
+ export declare function createExtractor(): any;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createExtractor = exports.createNewPo = exports.getExtractor = exports.getPoObjects = void 0;
4
+ const util_1 = require("util");
5
+ const fs_extra_1 = require("fs-extra");
6
+ const fast_glob_1 = require("fast-glob");
7
+ const pofile_1 = require("pofile");
8
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
9
+ // @ts-ignore
10
+ const angular_gettext_tools_1 = require("angular-gettext-tools");
11
+ const locale_json_paths_1 = require("./locale-json-paths");
12
+ const _ = require("lodash");
13
+ const loadPo = (0, util_1.promisify)(pofile_1.load);
14
+ /**
15
+ * Loads PO objects from specified paths.
16
+ * @param paths An array of directory paths where .po files are located.
17
+ * @returns A Promise that resolves to an array of PO objects.
18
+ */
19
+ async function getPoObjects(paths) {
20
+ const g = '{**/,}*.po';
21
+ let poFilePaths = [];
22
+ for (const cwd of paths) {
23
+ const options = {
24
+ cwd,
25
+ absolute: true,
26
+ ignore: ['dist/**']
27
+ };
28
+ poFilePaths = poFilePaths.concat(await (0, fast_glob_1.async)(g, options));
29
+ }
30
+ const poPromises = poFilePaths.map(p => loadPo(String(p)));
31
+ return Promise.all(poPromises);
32
+ }
33
+ exports.getPoObjects = getPoObjects;
34
+ /**
35
+ * Retrieves a configured extractor for source files located at the given paths.
36
+ * @param paths An array of paths to the directories containing source files.
37
+ * @returns A Promise that resolves to an instance of Extractor.
38
+ */
39
+ async function getExtractor(paths) {
40
+ const patterns = paths
41
+ .map(path => `${(0, fast_glob_1.convertPathToPattern)(path)}/{**/,}*.{ts,js,html}`)
42
+ .concat(paths.map(path => `${(0, fast_glob_1.convertPathToPattern)(path)}/${locale_json_paths_1.jsonPathsGlobs}/*.json`));
43
+ const options = {
44
+ unique: true,
45
+ ignore: ['**/node_modules/**', '**/*spec.*s', '.tmp/**', '**/modules/dist/**'],
46
+ absolute: true
47
+ };
48
+ const transformFile = (filename) => {
49
+ let transform = (a) => a;
50
+ if (/json$/.test(filename)) {
51
+ filename = filename.replace(/json$/, 'js');
52
+ const matched = locale_json_paths_1.jsonPaths.find(({ matches }) => matches(filename));
53
+ transform = matched ? matched.transform : () => '';
54
+ }
55
+ return (data) => ({ filename, data: transform(data) });
56
+ };
57
+ const filePaths = await (0, fast_glob_1.async)(patterns, options);
58
+ const promises = filePaths.map(file => {
59
+ return (0, fs_extra_1.readFile)(String(file), 'utf8').then(transformFile(file));
60
+ });
61
+ const files = await Promise.all(promises);
62
+ const extractor = createExtractor();
63
+ files.forEach(({ filename, data }) => extractor.parse(filename, data));
64
+ return extractor;
65
+ }
66
+ exports.getExtractor = getExtractor;
67
+ /**
68
+ * Creates a new PO object based on the template provided by another PO object.
69
+ * @param po The PO object to use as a template for the new PO object.
70
+ * @returns A new PO object initialized with the headers from the template PO.
71
+ */
72
+ function createNewPo(po) {
73
+ const newPo = (0, pofile_1.parse)('');
74
+ Object.assign(newPo.headers, po && po.headers);
75
+ return newPo;
76
+ }
77
+ exports.createNewPo = createNewPo;
78
+ /**
79
+ * Creates an extractor that can be used to extract strings from files.
80
+ * @returns An instance of an Extractor.
81
+ */
82
+ function createExtractor() {
83
+ const ext = new angular_gettext_tools_1.Extractor();
84
+ ext.toPo = function () {
85
+ const catalog = (0, pofile_1.parse)('');
86
+ catalog.headers = {
87
+ 'Content-Type': 'text/plain; charset=UTF-8',
88
+ 'Content-Transfer-Encoding': '8bit',
89
+ 'Project-Id-Version': ''
90
+ };
91
+ _.forEach(this.strings, msg => {
92
+ const contexts = Object.keys(msg).sort();
93
+ for (const ctx of contexts) {
94
+ catalog.items.push(msg[ctx]);
95
+ }
96
+ });
97
+ catalog.items.sort((a, b) => a.msgid.localeCompare(b.msgid));
98
+ this.options.postProcess(catalog);
99
+ return catalog;
100
+ };
101
+ return ext;
102
+ }
103
+ exports.createExtractor = createExtractor;
104
+ //# sourceMappingURL=locale-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-utils.js","sourceRoot":"","sources":["../../../src/utils/locale-utils.ts"],"names":[],"mappings":";;;AAAA,+BAAiC;AACjC,uCAAoC;AACpC,yCAAgE;AAChE,mCAAsE;AACtE,6DAA6D;AAC7D,aAAa;AACb,iEAAkD;AAClD,2DAAgE;AAChE,4BAA4B;AAE5B,MAAM,MAAM,GAAG,IAAA,gBAAS,EAAC,aAAc,CAAC,CAAC;AAEzC;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAC,KAAe;IAChD,MAAM,CAAC,GAAG,YAAY,CAAC;IACvB,IAAI,WAAW,GAAa,EAAE,CAAC;IAC/B,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,MAAM,OAAO,GAAG;YACd,GAAG;YACH,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,CAAC,SAAS,CAAC;SACpB,CAAC;QACF,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM,IAAA,iBAAI,EAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;KAC1D;IACD,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3D,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACjC,CAAC;AAbD,oCAaC;AACD;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAC,KAAe;IAChD,MAAM,QAAQ,GAAG,KAAK;SACnB,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAA,gCAAoB,EAAC,IAAI,CAAC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AC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAE7D,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC;AAvBD,0CAuBC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs_extra_1 = require("fs-extra");
4
+ const path = require("path");
5
+ /**
6
+ * TODO: check if there is other way to configure it.
7
+ * Modify path to build.json file in the final bundle.
8
+ */
9
+ const packageJsonPath = path.resolve(__dirname, '../../package.json');
10
+ const packageJson = JSON.parse((0, fs_extra_1.readFileSync)(packageJsonPath, 'utf8'));
11
+ packageJson['builders'] = './builders.json';
12
+ (0, fs_extra_1.writeFileSync)(packageJsonPath, JSON.stringify(packageJson, null, 2));
13
+ //# sourceMappingURL=package-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-config.js","sourceRoot":"","sources":["../../../src/utils/package-config.ts"],"names":[],"mappings":";;AAAA,uCAAuD;AACvD,6BAA6B;AAE7B;;;GAGG;AACH,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAEtE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,uBAAY,EAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;AAEtE,WAAW,CAAC,UAAU,CAAC,GAAG,iBAAiB,CAAC;AAE5C,IAAA,wBAAa,EAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC"}