@aidc-toolkit/app-extension 1.0.46-beta → 1.0.46

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 (163) hide show
  1. package/dist/chunk-FAD3UX6B.js +1 -0
  2. package/dist/{descriptor.d.ts → descriptor-FJHoLlYK.d.cts} +13 -13
  3. package/dist/descriptor-FJHoLlYK.d.ts +197 -0
  4. package/dist/generator/index.cjs +17 -0
  5. package/dist/generator/{generator.d.ts → index.d.cts} +9 -7
  6. package/dist/generator/index.d.ts +125 -17
  7. package/dist/generator/index.js +1 -2
  8. package/dist/index.cjs +17 -0
  9. package/dist/index.d.cts +1557 -0
  10. package/dist/index.d.ts +1557 -26
  11. package/dist/index.js +1 -8
  12. package/package.json +1 -1
  13. package/tsconfig-src.tsbuildinfo +1 -1
  14. package/dist/app-extension.d.ts +0 -194
  15. package/dist/app-extension.d.ts.map +0 -1
  16. package/dist/app-extension.js +0 -133
  17. package/dist/app-extension.js.map +0 -1
  18. package/dist/app-helper-proxy.d.ts +0 -61
  19. package/dist/app-helper-proxy.d.ts.map +0 -1
  20. package/dist/app-helper-proxy.js +0 -333
  21. package/dist/app-helper-proxy.js.map +0 -1
  22. package/dist/descriptor.d.ts.map +0 -1
  23. package/dist/descriptor.js +0 -44
  24. package/dist/descriptor.js.map +0 -1
  25. package/dist/generator/generator.d.ts.map +0 -1
  26. package/dist/generator/generator.js +0 -190
  27. package/dist/generator/generator.js.map +0 -1
  28. package/dist/generator/index.d.ts.map +0 -1
  29. package/dist/generator/index.js.map +0 -1
  30. package/dist/generator/locale-resources-generator.d.ts +0 -2
  31. package/dist/generator/locale-resources-generator.d.ts.map +0 -1
  32. package/dist/generator/locale-resources-generator.js +0 -312
  33. package/dist/generator/locale-resources-generator.js.map +0 -1
  34. package/dist/gs1/character-set-proxy.d.ts +0 -13
  35. package/dist/gs1/character-set-proxy.d.ts.map +0 -1
  36. package/dist/gs1/character-set-proxy.js +0 -126
  37. package/dist/gs1/character-set-proxy.js.map +0 -1
  38. package/dist/gs1/check-proxy.d.ts +0 -11
  39. package/dist/gs1/check-proxy.d.ts.map +0 -1
  40. package/dist/gs1/check-proxy.js +0 -163
  41. package/dist/gs1/check-proxy.js.map +0 -1
  42. package/dist/gs1/gcp-length-proxy.d.ts +0 -11
  43. package/dist/gs1/gcp-length-proxy.d.ts.map +0 -1
  44. package/dist/gs1/gcp-length-proxy.js +0 -190
  45. package/dist/gs1/gcp-length-proxy.js.map +0 -1
  46. package/dist/gs1/gtin-creator-proxy.d.ts +0 -10
  47. package/dist/gs1/gtin-creator-proxy.d.ts.map +0 -1
  48. package/dist/gs1/gtin-creator-proxy.js +0 -85
  49. package/dist/gs1/gtin-creator-proxy.js.map +0 -1
  50. package/dist/gs1/gtin-descriptor.d.ts +0 -3
  51. package/dist/gs1/gtin-descriptor.d.ts.map +0 -1
  52. package/dist/gs1/gtin-descriptor.js +0 -8
  53. package/dist/gs1/gtin-descriptor.js.map +0 -1
  54. package/dist/gs1/gtin-validator-proxy.d.ts +0 -26
  55. package/dist/gs1/gtin-validator-proxy.d.ts.map +0 -1
  56. package/dist/gs1/gtin-validator-proxy.js +0 -256
  57. package/dist/gs1/gtin-validator-proxy.js.map +0 -1
  58. package/dist/gs1/identifier-creator-proxy.d.ts +0 -30
  59. package/dist/gs1/identifier-creator-proxy.d.ts.map +0 -1
  60. package/dist/gs1/identifier-creator-proxy.js +0 -302
  61. package/dist/gs1/identifier-creator-proxy.js.map +0 -1
  62. package/dist/gs1/identifier-descriptor.d.ts +0 -4
  63. package/dist/gs1/identifier-descriptor.d.ts.map +0 -1
  64. package/dist/gs1/identifier-descriptor.js +0 -14
  65. package/dist/gs1/identifier-descriptor.js.map +0 -1
  66. package/dist/gs1/identifier-type.d.ts +0 -22
  67. package/dist/gs1/identifier-type.d.ts.map +0 -1
  68. package/dist/gs1/identifier-type.js +0 -34
  69. package/dist/gs1/identifier-type.js.map +0 -1
  70. package/dist/gs1/identifier-validator-proxy.d.ts +0 -29
  71. package/dist/gs1/identifier-validator-proxy.d.ts.map +0 -1
  72. package/dist/gs1/identifier-validator-proxy.js +0 -212
  73. package/dist/gs1/identifier-validator-proxy.js.map +0 -1
  74. package/dist/gs1/index.d.ts +0 -11
  75. package/dist/gs1/index.d.ts.map +0 -1
  76. package/dist/gs1/index.js +0 -11
  77. package/dist/gs1/index.js.map +0 -1
  78. package/dist/gs1/non-gtin-creator-proxy.d.ts +0 -38
  79. package/dist/gs1/non-gtin-creator-proxy.d.ts.map +0 -1
  80. package/dist/gs1/non-gtin-creator-proxy.js +0 -301
  81. package/dist/gs1/non-gtin-creator-proxy.js.map +0 -1
  82. package/dist/gs1/non-gtin-validator-proxy.d.ts +0 -37
  83. package/dist/gs1/non-gtin-validator-proxy.d.ts.map +0 -1
  84. package/dist/gs1/non-gtin-validator-proxy.js +0 -302
  85. package/dist/gs1/non-gtin-validator-proxy.js.map +0 -1
  86. package/dist/gs1/prefix-definition-descriptor.d.ts +0 -4
  87. package/dist/gs1/prefix-definition-descriptor.d.ts.map +0 -1
  88. package/dist/gs1/prefix-definition-descriptor.js +0 -16
  89. package/dist/gs1/prefix-definition-descriptor.js.map +0 -1
  90. package/dist/gs1/prefix-manager-proxy.d.ts +0 -8
  91. package/dist/gs1/prefix-manager-proxy.d.ts.map +0 -1
  92. package/dist/gs1/prefix-manager-proxy.js +0 -94
  93. package/dist/gs1/prefix-manager-proxy.js.map +0 -1
  94. package/dist/gs1/variable-measure-proxy.d.ts +0 -7
  95. package/dist/gs1/variable-measure-proxy.d.ts.map +0 -1
  96. package/dist/gs1/variable-measure-proxy.js +0 -114
  97. package/dist/gs1/variable-measure-proxy.js.map +0 -1
  98. package/dist/gs1/verified-by-gs1-proxy.d.ts +0 -7
  99. package/dist/gs1/verified-by-gs1-proxy.d.ts.map +0 -1
  100. package/dist/gs1/verified-by-gs1-proxy.js +0 -106
  101. package/dist/gs1/verified-by-gs1-proxy.js.map +0 -1
  102. package/dist/index.d.ts.map +0 -1
  103. package/dist/index.js.map +0 -1
  104. package/dist/lib-proxy.d.ts +0 -135
  105. package/dist/lib-proxy.d.ts.map +0 -1
  106. package/dist/lib-proxy.js +0 -276
  107. package/dist/lib-proxy.js.map +0 -1
  108. package/dist/locale/en/locale-resources.d.ts +0 -752
  109. package/dist/locale/en/locale-resources.d.ts.map +0 -1
  110. package/dist/locale/en/locale-resources.js +0 -751
  111. package/dist/locale/en/locale-resources.js.map +0 -1
  112. package/dist/locale/fr/locale-resources.d.ts +0 -752
  113. package/dist/locale/fr/locale-resources.d.ts.map +0 -1
  114. package/dist/locale/fr/locale-resources.js +0 -751
  115. package/dist/locale/fr/locale-resources.js.map +0 -1
  116. package/dist/locale/i18n.d.ts +0 -27
  117. package/dist/locale/i18n.d.ts.map +0 -1
  118. package/dist/locale/i18n.js +0 -36
  119. package/dist/locale/i18n.js.map +0 -1
  120. package/dist/proxy.d.ts +0 -136
  121. package/dist/proxy.d.ts.map +0 -1
  122. package/dist/proxy.js +0 -295
  123. package/dist/proxy.js.map +0 -1
  124. package/dist/streaming.d.ts +0 -10
  125. package/dist/streaming.d.ts.map +0 -1
  126. package/dist/streaming.js +0 -2
  127. package/dist/streaming.js.map +0 -1
  128. package/dist/type.d.ts +0 -91
  129. package/dist/type.d.ts.map +0 -1
  130. package/dist/type.js +0 -2
  131. package/dist/type.js.map +0 -1
  132. package/dist/utility/character-set-descriptor.d.ts +0 -6
  133. package/dist/utility/character-set-descriptor.d.ts.map +0 -1
  134. package/dist/utility/character-set-descriptor.js +0 -28
  135. package/dist/utility/character-set-descriptor.js.map +0 -1
  136. package/dist/utility/character-set-proxy.d.ts +0 -31
  137. package/dist/utility/character-set-proxy.d.ts.map +0 -1
  138. package/dist/utility/character-set-proxy.js +0 -278
  139. package/dist/utility/character-set-proxy.js.map +0 -1
  140. package/dist/utility/index.d.ts +0 -4
  141. package/dist/utility/index.d.ts.map +0 -1
  142. package/dist/utility/index.js +0 -4
  143. package/dist/utility/index.js.map +0 -1
  144. package/dist/utility/reg-exp-proxy.d.ts +0 -8
  145. package/dist/utility/reg-exp-proxy.d.ts.map +0 -1
  146. package/dist/utility/reg-exp-proxy.js +0 -103
  147. package/dist/utility/reg-exp-proxy.js.map +0 -1
  148. package/dist/utility/string-descriptor.d.ts +0 -4
  149. package/dist/utility/string-descriptor.d.ts.map +0 -1
  150. package/dist/utility/string-descriptor.js +0 -12
  151. package/dist/utility/string-descriptor.js.map +0 -1
  152. package/dist/utility/string-proxy.d.ts +0 -7
  153. package/dist/utility/string-proxy.d.ts.map +0 -1
  154. package/dist/utility/string-proxy.js +0 -63
  155. package/dist/utility/string-proxy.js.map +0 -1
  156. package/dist/utility/transformer-descriptor.d.ts +0 -6
  157. package/dist/utility/transformer-descriptor.d.ts.map +0 -1
  158. package/dist/utility/transformer-descriptor.js +0 -24
  159. package/dist/utility/transformer-descriptor.js.map +0 -1
  160. package/dist/utility/transformer-proxy.d.ts +0 -9
  161. package/dist/utility/transformer-proxy.d.ts.map +0 -1
  162. package/dist/utility/transformer-proxy.js +0 -111
  163. package/dist/utility/transformer-proxy.js.map +0 -1
@@ -1,190 +0,0 @@
1
- import { ALPHA_URL, getLogger, I18nEnvironments, websiteURL } from "@aidc-toolkit/core";
2
- import { AppHelperProxy } from "../app-helper-proxy.js";
3
- import * as GS1 from "../gs1/index.js";
4
- import { appExtensionResourceBundle, i18nAppExtensionInit, i18nextAppExtension } from "../locale/i18n.js";
5
- import { proxy } from "../proxy.js";
6
- import * as Utility from "../utility/index.js";
7
- /**
8
- * Dummy method to force proxies to register their decorators.
9
- *
10
- * @param _proxies
11
- * Proxies.
12
- */
13
- function registerProxies(..._proxies) {
14
- }
15
- registerProxies(AppHelperProxy, Utility, GS1);
16
- /**
17
- * Abstract generator.
18
- */
19
- export class Generator {
20
- /**
21
- * Documentation path, optionally preceded by locale.
22
- */
23
- static #DOCUMENTATION_PATH = "app-extension/";
24
- /**
25
- * Logger.
26
- */
27
- #logger = getLogger();
28
- /**
29
- * Package version.
30
- */
31
- #version;
32
- /**
33
- * Locales.
34
- */
35
- #locales;
36
- /**
37
- * Default locale.
38
- */
39
- #defaultLocale;
40
- /**
41
- * Constructor.
42
- *
43
- * @param version
44
- * Package version.
45
- *
46
- * @param includeLocalizations
47
- * Include localizations if true.
48
- */
49
- constructor(version, includeLocalizations = true) {
50
- this.#version = version;
51
- this.#locales = includeLocalizations ? Object.keys(appExtensionResourceBundle) : [];
52
- this.#defaultLocale = this.#locales[0] ?? "";
53
- }
54
- /**
55
- * Get the logger.
56
- */
57
- get logger() {
58
- return this.#logger;
59
- }
60
- /**
61
- * Get the package version.
62
- */
63
- get version() {
64
- return this.#version;
65
- }
66
- /**
67
- * Get the locales.
68
- */
69
- get locales() {
70
- return this.#locales;
71
- }
72
- /**
73
- * Get the default locale.
74
- */
75
- get defaultLocale() {
76
- return this.#defaultLocale;
77
- }
78
- /**
79
- * Generate a localization.
80
- *
81
- * @template TLocalization
82
- * Localization type.
83
- *
84
- * @param locale
85
- * Locale.
86
- *
87
- * @param key
88
- * Key.
89
- *
90
- * @param localizationCallback
91
- * Callback to finalize localization.
92
- *
93
- * @returns
94
- * Localization.
95
- */
96
- static #generateLocalization(locale, key, localizationCallback) {
97
- const lngReturnObjectsOption = {
98
- lng: locale,
99
- returnObjects: true
100
- };
101
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists and return type is Localization.
102
- return localizationCallback(locale, i18nextAppExtension.t(key, lngReturnObjectsOption));
103
- }
104
- /**
105
- * Generate by processing individual imports.
106
- */
107
- async generate() {
108
- let success = false;
109
- await i18nAppExtensionInit(I18nEnvironments.CLI);
110
- const documentationBaseURL = websiteURL(this.version, true, await ALPHA_URL);
111
- await this.initialize();
112
- const namespaceHierarchy = new Map();
113
- // Organize class descriptors by namespace and category.
114
- for (const classDescriptor of proxy.classDescriptors) {
115
- const namespace = classDescriptor.namespace;
116
- const category = classDescriptor.category;
117
- let categoryHierarchy = namespaceHierarchy.get(namespace);
118
- if (categoryHierarchy === undefined) {
119
- categoryHierarchy = new Map();
120
- namespaceHierarchy.set(namespace, categoryHierarchy);
121
- }
122
- let classDescriptors = categoryHierarchy.get(category);
123
- if (classDescriptors === undefined) {
124
- classDescriptors = [];
125
- categoryHierarchy.set(category, classDescriptors);
126
- }
127
- classDescriptors.push(classDescriptor);
128
- }
129
- try {
130
- for (const [namespace, categoryHierarchy] of namespaceHierarchy) {
131
- const namespacePrefix = namespace === undefined ? "" : `${namespace}.`;
132
- const namespacePath = namespace === undefined ? "" : `${namespace}/`;
133
- this.createNamespace(namespace);
134
- for (const [category, classDescriptors] of categoryHierarchy) {
135
- const namespaceCategory = `${namespacePrefix}${category}`;
136
- const categoriesKey = `Categories.${category}`;
137
- const namespaceCategoriesKey = `Categories.${namespaceCategory}`;
138
- const categoryLocalizationsMap = new Map(this.locales.map((locale) => {
139
- const lngOption = {
140
- lng: locale
141
- };
142
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
143
- return [locale, i18nextAppExtension.t((i18nextAppExtension.exists(namespaceCategoriesKey, lngOption) ? namespaceCategoriesKey : categoriesKey), lngOption)];
144
- }));
145
- this.createCategory(namespace, category, categoryLocalizationsMap);
146
- const namespaceClassNamesSet = new Set();
147
- for (const classDescriptor of classDescriptors) {
148
- const namespaceClassName = classDescriptor.namespaceClassName;
149
- if (namespaceClassNamesSet.has(namespaceClassName)) {
150
- throw new Error(`Duplicate class ${namespaceClassName}`);
151
- }
152
- namespaceClassNamesSet.add(namespaceClassName);
153
- // First capture group is:
154
- // - one or more uppercase letters followed by zero or more numbers; or
155
- // - single uppercase letter followed by zero or more characters except uppercase letters or period.
156
- //
157
- // Second capture group is:
158
- // - single uppercase letter followed by zero or more characters except period; or
159
- // - zero characters (empty string).
160
- //
161
- // Third capture group, separated by optional period, is:
162
- // - single uppercase letter followed by zero or more characters (remainder of string); or
163
- // - zero characters (empty string).
164
- const objectNameGroups = /^(?<namespaceFirstWord>[A-Z]+[0-9]*|[A-Z][^A-Z.]*)(?<namespaceRemaining>[A-Z][^.]*|)\.?(?<className>[A-Z].*|)$/u.exec(namespaceClassName)?.groups;
165
- if (objectNameGroups === undefined) {
166
- throw new Error(`${namespaceClassName} is not a valid namespace-qualified class name`);
167
- }
168
- this.createProxyObject(`${objectNameGroups["namespaceFirstWord"].toLowerCase()}${objectNameGroups["namespaceRemaining"]}${objectNameGroups["className"]}`, classDescriptor);
169
- for (const methodDescriptor of classDescriptor.methodDescriptors) {
170
- const functionLocalizationsMap = new Map(this.locales.map(locale => [locale, Generator.#generateLocalization(locale, `Functions.${methodDescriptor.namespaceFunctionName}`, (locale, localization) => ({
171
- ...localization,
172
- namespaceFunctionName: `${namespacePrefix}${localization.name}`,
173
- documentationURL: `${documentationBaseURL}/${locale === this.defaultLocale ? "" : `${locale}/`}${Generator.#DOCUMENTATION_PATH}${namespacePath}${localization.name}.html`,
174
- parametersMap: new Map(methodDescriptor.parameterDescriptors.map(parameterDescriptor =>
175
- // eslint-disable-next-line max-nested-callbacks -- Callback is empty.
176
- [parameterDescriptor.name, Generator.#generateLocalization(locale, `Parameters.${parameterDescriptor.name}`, (_locale, localization) => localization)]))
177
- }))]));
178
- this.createProxyFunction(classDescriptor, methodDescriptor, functionLocalizationsMap);
179
- }
180
- }
181
- }
182
- }
183
- success = true;
184
- }
185
- finally {
186
- await this.finalize(success);
187
- }
188
- }
189
- }
190
- //# sourceMappingURL=generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/generator/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAmB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGzG,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,mB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AC/D,gBAAgB,EAAE,GAAG,oBAAoB,IAAI,MAAM,KAAK,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,GAAG,SAAS,CAAC,mBAAmB,GAAG,aAAa,GAAG,YAAY,CAAC,IAAI,OAAO;oCACzK,aAAa,EAAE,IAAI,GAAG,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE;oCACnF,sEAAsE;oCACtE,CAAC,mBAAmB,CAAC,IAAI,EAAE,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,cAAc,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CACzJ,CAAC;iCACL,CAAC,CAAC,CAAC,CACP,CAAC,CAAC;4BAEH,IAAI,CAAC,mBAAmB,CAAC,eAAe,EAAE,gBAAgB,EAAE,wBAAwB,CAAC,CAAC;wBAC1F,CAAC;oBACL,CAAC;gBACL,CAAC;YACL,CAAC;YAED,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;gBAAS,CAAC;YACP,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;IACL,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,gBAAgB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=locale-resources-generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locale-resources-generator.d.ts","sourceRoot":"","sources":["../../src/generator/locale-resources-generator.ts"],"names":[],"mappings":""}
@@ -1,312 +0,0 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
- import packageConfiguration from "../../package.json" with { type: "json" };
4
- import { Generator } from "./generator.js";
5
- /**
6
- * Locale resources generator.
7
- */
8
- class LocaleResourcesGenerator extends Generator {
9
- /**
10
- * Locale resources import path.
11
- */
12
- static #IMPORT_PATH = "../app-extension/src/locale";
13
- /**
14
- * Parameters sequencer.
15
- */
16
- #parametersSequencer = {};
17
- /**
18
- * Parameters locale resources.
19
- */
20
- #parametersLocaleResources = {};
21
- /**
22
- * Functions locale resources.
23
- */
24
- #functionsLocaleResources = {};
25
- /**
26
- * Locale resources.
27
- */
28
- #LocaleResources = {
29
- Parameters: this.#parametersLocaleResources,
30
- Functions: this.#functionsLocaleResources
31
- };
32
- /**
33
- * Constructor.
34
- */
35
- constructor() {
36
- super(packageConfiguration.version, false);
37
- }
38
- /**
39
- * @inheritDoc
40
- */
41
- initialize() {
42
- }
43
- /**
44
- * @inheritDoc
45
- */
46
- createNamespace() {
47
- }
48
- /**
49
- * @inheritDoc
50
- */
51
- createCategory() {
52
- }
53
- /**
54
- * @inheritDoc
55
- */
56
- createProxyObject() {
57
- }
58
- /**
59
- * Save a parameter descriptor in the appropriate spot in the sequence.
60
- *
61
- * @param parameterDescriptor
62
- * Parameter descriptor.
63
- *
64
- * @param isUsed
65
- * True if parameter descriptor is actually used and not just a base.
66
- *
67
- * @returns
68
- * Parameters sequencer entry.
69
- */
70
- #saveParameterSequence(parameterDescriptor, isUsed) {
71
- let parametersSequencerEntry;
72
- if (!("extendsDescriptor" in parameterDescriptor)) {
73
- const parameterName = parameterDescriptor.name;
74
- // Create entry if it doesn't exist, otherwise pick up where last call left off.
75
- if (!(parameterName in this.#parametersSequencer)) {
76
- parametersSequencerEntry = {
77
- parametersSequencerOrNull: null,
78
- parameterDescriptor,
79
- parameterName,
80
- baseParameterName: parameterName,
81
- isUsed
82
- };
83
- this.#parametersSequencer[parameterName] = parametersSequencerEntry;
84
- }
85
- else {
86
- parametersSequencerEntry = this.#parametersSequencer[parameterName];
87
- }
88
- }
89
- else {
90
- const baseParametersSequencerEntry = this.#saveParameterSequence(parameterDescriptor.extendsDescriptor, false);
91
- let parameterName;
92
- let baseParameterName;
93
- if (parameterDescriptor.name !== undefined) {
94
- parameterName = parameterDescriptor.name;
95
- baseParameterName = baseParametersSequencerEntry.parameterName;
96
- }
97
- else {
98
- parameterName = baseParametersSequencerEntry.parameterName;
99
- baseParameterName = baseParametersSequencerEntry.baseParameterName;
100
- }
101
- if (parameterName !== baseParameterName) {
102
- // Make sure that base parameters sequencer entry refers to a record type.
103
- baseParametersSequencerEntry.parametersSequencerOrNull ??= {};
104
- if (!(parameterName in baseParametersSequencerEntry.parametersSequencerOrNull)) {
105
- parametersSequencerEntry = {
106
- parametersSequencerOrNull: null,
107
- parameterDescriptor,
108
- parameterName,
109
- baseParameterName,
110
- isUsed
111
- };
112
- baseParametersSequencerEntry.parametersSequencerOrNull[parameterName] = parametersSequencerEntry;
113
- }
114
- else {
115
- parametersSequencerEntry = baseParametersSequencerEntry.parametersSequencerOrNull[parameterName];
116
- }
117
- }
118
- else {
119
- // If name is the same, which means that parameter descriptor modified type information only.
120
- parametersSequencerEntry = baseParametersSequencerEntry;
121
- }
122
- }
123
- return parametersSequencerEntry;
124
- }
125
- /**
126
- * @inheritDoc
127
- */
128
- createProxyFunction(classDescriptor, methodDescriptor) {
129
- // Hidden functions aren't localized.
130
- if (methodDescriptor.isHidden !== true) {
131
- // Add any parameters that are not already known.
132
- for (const parameterDescriptor of methodDescriptor.parameterDescriptors) {
133
- this.#saveParameterSequence(parameterDescriptor, true);
134
- }
135
- let functionsLocaleResources = this.#functionsLocaleResources;
136
- const namespace = classDescriptor.namespace;
137
- if (namespace !== undefined) {
138
- if (!(namespace in functionsLocaleResources)) {
139
- const namespaceFunctionsLocaleResources = {};
140
- // Add namespace and navigate to it.
141
- functionsLocaleResources[namespace] = namespaceFunctionsLocaleResources;
142
- functionsLocaleResources = namespaceFunctionsLocaleResources;
143
- }
144
- else {
145
- // Navigate to namespace.
146
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Entry is never a string.
147
- functionsLocaleResources = functionsLocaleResources[namespace];
148
- }
149
- }
150
- const functionName = methodDescriptor.functionName;
151
- if (functionName in functionsLocaleResources) {
152
- throw new Error(`Duplicate function ${functionName}`);
153
- }
154
- // Add function.
155
- functionsLocaleResources[functionName] = {
156
- name: functionName,
157
- description: "*** LOCALIZATION REQUIRED ***"
158
- };
159
- }
160
- }
161
- /**
162
- * Merge source locale resources into existing destination locale resources.
163
- *
164
- * @param logChanges
165
- * If true, changes are logged. Limits output when processing multiple sources.
166
- *
167
- * @param parentKey
168
- * Parent key for logging purposes.
169
- *
170
- * @param sourceLocaleResources
171
- * Source locale resources.
172
- *
173
- * @param destinationLocaleResources
174
- * Destination locale resources.
175
- *
176
- * @param addMissing
177
- * Add missing if true; applies to locale resources that are not regional.
178
- *
179
- * @returns
180
- * Merged locale resources.
181
- */
182
- #merge(logChanges, parentKey, sourceLocaleResources, destinationLocaleResources, addMissing) {
183
- // Some entries at the top are not part of the generator output.
184
- const deleteMissing = parentKey.length !== 0;
185
- const newDestinationLocaleResources = {};
186
- // Copy over or delete any destination keys that are not in source.
187
- for (const [key, destinationValue] of Object.entries(destinationLocaleResources)) {
188
- if (!(key in sourceLocaleResources)) {
189
- if (!deleteMissing) {
190
- newDestinationLocaleResources[key] = destinationValue;
191
- }
192
- else if (logChanges) {
193
- this.logger.info(`Deleting ${parentKey}${key}...`);
194
- }
195
- }
196
- }
197
- for (const [key, sourceValue] of Object.entries(sourceLocaleResources)) {
198
- if (!(key in destinationLocaleResources)) {
199
- if (addMissing) {
200
- if (logChanges) {
201
- this.logger.info(`Adding ${parentKey}${key}...`);
202
- }
203
- newDestinationLocaleResources[key] = sourceValue;
204
- }
205
- }
206
- else {
207
- const destinationValue = destinationLocaleResources[key];
208
- if (typeof sourceValue === "object" && typeof destinationValue === "object") {
209
- newDestinationLocaleResources[key] = this.#merge(logChanges, `${parentKey}${key}.`, sourceValue, destinationValue, addMissing);
210
- }
211
- else if (typeof sourceValue === "string" && typeof destinationValue === "string") {
212
- newDestinationLocaleResources[key] = destinationValue;
213
- }
214
- else {
215
- throw new Error(`Mismatched types at ${parentKey}${key}`);
216
- }
217
- }
218
- }
219
- return newDestinationLocaleResources;
220
- }
221
- /**
222
- * Build parameters locale resources by going through parameters sequencer.
223
- *
224
- * @param parametersSequencer
225
- * Parameters sequencer.
226
- */
227
- #buildParametersLocaleResources(parametersSequencer) {
228
- const entries = Object.entries(parametersSequencer);
229
- // Sort the entries as defined by the descriptors.
230
- entries.sort((entry1, entry2) => {
231
- let result;
232
- const parameterDescriptor1 = entry1[1].parameterDescriptor;
233
- const parameterDescriptor2 = entry2[1].parameterDescriptor;
234
- if ("sortOrder" in parameterDescriptor1) {
235
- if ("sortOrder" in parameterDescriptor2) {
236
- result = parameterDescriptor1.sortOrder - parameterDescriptor2.sortOrder;
237
- }
238
- else {
239
- // Parameter descriptors with undefined sort order to go the end.
240
- result = -parameterDescriptor1.sortOrder;
241
- }
242
- }
243
- else {
244
- // eslint-disable-next-line no-lonely-if -- Matches structure in "then" clause.
245
- if ("sortOrder" in parameterDescriptor2) {
246
- // Parameter descriptors with undefined sort order to go the end.
247
- result = parameterDescriptor2.sortOrder;
248
- }
249
- else {
250
- result = 0;
251
- }
252
- }
253
- return result;
254
- });
255
- for (const [parameterName, parametersSequencerEntry] of entries) {
256
- if (parametersSequencerEntry.isUsed) {
257
- this.#parametersLocaleResources[parameterName] = {
258
- name: parameterName,
259
- description: "*** LOCALIZATION REQUIRED ***"
260
- };
261
- }
262
- if (parametersSequencerEntry.parametersSequencerOrNull !== null) {
263
- this.#buildParametersLocaleResources(parametersSequencerEntry.parametersSequencerOrNull);
264
- }
265
- }
266
- }
267
- /**
268
- * Build output to be written back to source file.
269
- *
270
- * @param prefix
271
- * Line prefix.
272
- *
273
- * @param value
274
- * Line value.
275
- *
276
- * @param indentLevel
277
- * Indent level.
278
- *
279
- * @returns
280
- * Output string.
281
- */
282
- static #buildOutput(prefix, value, indentLevel) {
283
- return `${" ".repeat(indentLevel)}${prefix} ${typeof value === "object" ?
284
- `{\n${Object.entries(value).map(entry => LocaleResourcesGenerator.#buildOutput(`${entry[0]}:`, entry[1], indentLevel + 1)).join(",\n")}\n${" ".repeat(indentLevel)}}` :
285
- // JSON.stringify() will apply quotes as appropriate.
286
- JSON.stringify(value)}`;
287
- }
288
- /**
289
- * @inheritDoc
290
- */
291
- async finalize(success) {
292
- if (success) {
293
- this.#buildParametersLocaleResources(this.#parametersSequencer);
294
- await Promise.all(fs.readdirSync(LocaleResourcesGenerator.#IMPORT_PATH, {
295
- withFileTypes: true
296
- }).filter(entry => entry.isDirectory()).map(async (entry) => {
297
- const localeResourcesSource = path.resolve(LocaleResourcesGenerator.#IMPORT_PATH, entry.name, "locale-resources.ts");
298
- return import(localeResourcesSource).then((module) => {
299
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Module format is known.
300
- const localeResources = this.#merge(entry.name === "en", "", this.#LocaleResources, module.default, !entry.name.includes("-"));
301
- fs.writeFileSync(localeResourcesSource, `${LocaleResourcesGenerator.#buildOutput("export default", localeResources, 0)};\n`);
302
- });
303
- }));
304
- }
305
- }
306
- }
307
- const generator = new LocaleResourcesGenerator();
308
- generator.generate().catch((e) => {
309
- generator.logger.error(e);
310
- process.exit(1);
311
- });
312
- //# sourceMappingURL=locale-resources-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locale-resources-generator.js","sourceRoot":"","sources":["../../src/generator/locale-resources-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,oBAAoB,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAO5E,OAAO,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AAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;gBACxD,MAAM,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;gBAErH,OAAO,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;oBACjD,kGAAkG;oBAClG,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,gBAAgB,EAAG,MAAgC,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;oBAE1J,EAAE,CAAC,aAAa,CAAC,qBAAqB,EAAE,GAAG,wBAAwB,CAAC,YAAY,CAAC,gBAAgB,EAAE,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;gBACjI,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC,CAAC;QACR,CAAC;IACL,CAAC;;AAGL,MAAM,SAAS,GAAG,IAAI,wBAAwB,EAAE,CAAC;AAEjD,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE;IACtC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { AppExtension } from "../app-extension.js";
2
- import type { ErrorExtends } from "../type.js";
3
- import { CharacterSetCreatorProxy, CharacterSetValidatorProxy } from "../utility/index.js";
4
- export declare class AI82Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
5
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
6
- }
7
- export declare class AI39Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
8
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
9
- }
10
- export declare class AI64Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
11
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
12
- }
13
- //# sourceMappingURL=character-set-proxy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"character-set-proxy.d.ts","sourceRoot":"","sources":["../../src/gs1/character-set-proxy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAE3F,qBAUa,SAAS,CAAC,UAAU,SAAS,OAAO,EAAE,MAAM,SAAS,YAAY,CAAC,UAAU,CAAC,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAE,SAAQ,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;gBACpP,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;CAGvH;AAED,qBAUa,SAAS,CAAC,UAAU,SAAS,OAAO,EAAE,MAAM,SAAS,YAAY,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