@aidc-toolkit/app-extension 1.0.23-beta → 1.0.24-beta

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 (126) hide show
  1. package/dist/index.cjs +3414 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +1747 -0
  4. package/dist/index.d.ts +1747 -26
  5. package/dist/index.js +3379 -9
  6. package/dist/index.js.map +1 -1
  7. package/package.json +7 -10
  8. package/src/app-extension.ts +3 -10
  9. package/src/app-utility-proxy.ts +5 -4
  10. package/src/descriptor.ts +12 -8
  11. package/src/generator/descriptor.ts +1 -1
  12. package/src/generator/generator.ts +4 -4
  13. package/src/generator/index.ts +2 -2
  14. package/src/generator/locale-resources-generator.ts +14 -10
  15. package/src/gs1/character-set-proxy.ts +5 -5
  16. package/src/gs1/check-proxy.ts +3 -3
  17. package/src/gs1/identifier-proxy.ts +9 -8
  18. package/src/gs1/index.ts +3 -3
  19. package/src/index.ts +9 -9
  20. package/src/lib-proxy.ts +3 -3
  21. package/src/locale/i18n.ts +3 -5
  22. package/src/locale/i18next.d.ts +1 -1
  23. package/{dist/types.d.ts → src/type.ts} +10 -38
  24. package/src/utility/character-set-descriptor.ts +1 -1
  25. package/src/utility/character-set-proxy.ts +9 -8
  26. package/src/utility/index.ts +3 -3
  27. package/src/utility/reg-exp-proxy.ts +5 -4
  28. package/src/utility/string-descriptor.ts +1 -1
  29. package/src/utility/string-proxy.ts +2 -2
  30. package/src/utility/transformer-descriptor.ts +1 -1
  31. package/src/utility/transformer-proxy.ts +5 -4
  32. package/tsup.config.ts +3 -0
  33. package/dist/app-extension.d.ts +0 -169
  34. package/dist/app-extension.d.ts.map +0 -1
  35. package/dist/app-extension.js +0 -148
  36. package/dist/app-extension.js.map +0 -1
  37. package/dist/app-utility-proxy.d.ts +0 -66
  38. package/dist/app-utility-proxy.d.ts.map +0 -1
  39. package/dist/app-utility-proxy.js +0 -233
  40. package/dist/app-utility-proxy.js.map +0 -1
  41. package/dist/descriptor.d.ts +0 -172
  42. package/dist/descriptor.d.ts.map +0 -1
  43. package/dist/descriptor.js +0 -174
  44. package/dist/descriptor.js.map +0 -1
  45. package/dist/generator/descriptor.d.ts +0 -107
  46. package/dist/generator/descriptor.d.ts.map +0 -1
  47. package/dist/generator/descriptor.js +0 -2
  48. package/dist/generator/descriptor.js.map +0 -1
  49. package/dist/generator/generator.d.ts +0 -120
  50. package/dist/generator/generator.d.ts.map +0 -1
  51. package/dist/generator/generator.js +0 -213
  52. package/dist/generator/generator.js.map +0 -1
  53. package/dist/generator/index.d.ts +0 -3
  54. package/dist/generator/index.d.ts.map +0 -1
  55. package/dist/generator/index.js +0 -2
  56. package/dist/generator/index.js.map +0 -1
  57. package/dist/gs1/character-set-proxy.d.ts +0 -10
  58. package/dist/gs1/character-set-proxy.d.ts.map +0 -1
  59. package/dist/gs1/character-set-proxy.js +0 -47
  60. package/dist/gs1/character-set-proxy.js.map +0 -1
  61. package/dist/gs1/check-proxy.d.ts +0 -11
  62. package/dist/gs1/check-proxy.d.ts.map +0 -1
  63. package/dist/gs1/check-proxy.js +0 -120
  64. package/dist/gs1/check-proxy.js.map +0 -1
  65. package/dist/gs1/identifier-proxy.d.ts +0 -136
  66. package/dist/gs1/identifier-proxy.d.ts.map +0 -1
  67. package/dist/gs1/identifier-proxy.js +0 -782
  68. package/dist/gs1/identifier-proxy.js.map +0 -1
  69. package/dist/gs1/index.d.ts +0 -4
  70. package/dist/gs1/index.d.ts.map +0 -1
  71. package/dist/gs1/index.js +0 -4
  72. package/dist/gs1/index.js.map +0 -1
  73. package/dist/index.d.ts.map +0 -1
  74. package/dist/lib-proxy.d.ts +0 -135
  75. package/dist/lib-proxy.d.ts.map +0 -1
  76. package/dist/lib-proxy.js +0 -235
  77. package/dist/lib-proxy.js.map +0 -1
  78. package/dist/locale/en/locale-resources.d.ts +0 -617
  79. package/dist/locale/en/locale-resources.d.ts.map +0 -1
  80. package/dist/locale/en/locale-resources.js +0 -616
  81. package/dist/locale/en/locale-resources.js.map +0 -1
  82. package/dist/locale/fr/locale-resources.d.ts +0 -617
  83. package/dist/locale/fr/locale-resources.d.ts.map +0 -1
  84. package/dist/locale/fr/locale-resources.js +0 -616
  85. package/dist/locale/fr/locale-resources.js.map +0 -1
  86. package/dist/locale/i18n.d.ts +0 -27
  87. package/dist/locale/i18n.d.ts.map +0 -1
  88. package/dist/locale/i18n.js +0 -39
  89. package/dist/locale/i18n.js.map +0 -1
  90. package/dist/types.d.ts.map +0 -1
  91. package/dist/types.js +0 -13
  92. package/dist/types.js.map +0 -1
  93. package/dist/utility/character-set-descriptor.d.ts +0 -6
  94. package/dist/utility/character-set-descriptor.d.ts.map +0 -1
  95. package/dist/utility/character-set-descriptor.js +0 -28
  96. package/dist/utility/character-set-descriptor.js.map +0 -1
  97. package/dist/utility/character-set-proxy.d.ts +0 -26
  98. package/dist/utility/character-set-proxy.d.ts.map +0 -1
  99. package/dist/utility/character-set-proxy.js +0 -167
  100. package/dist/utility/character-set-proxy.js.map +0 -1
  101. package/dist/utility/index.d.ts +0 -4
  102. package/dist/utility/index.d.ts.map +0 -1
  103. package/dist/utility/index.js +0 -4
  104. package/dist/utility/index.js.map +0 -1
  105. package/dist/utility/reg-exp-proxy.d.ts +0 -7
  106. package/dist/utility/reg-exp-proxy.d.ts.map +0 -1
  107. package/dist/utility/reg-exp-proxy.js +0 -61
  108. package/dist/utility/reg-exp-proxy.js.map +0 -1
  109. package/dist/utility/string-descriptor.d.ts +0 -4
  110. package/dist/utility/string-descriptor.d.ts.map +0 -1
  111. package/dist/utility/string-descriptor.js +0 -12
  112. package/dist/utility/string-descriptor.js.map +0 -1
  113. package/dist/utility/string-proxy.d.ts +0 -8
  114. package/dist/utility/string-proxy.d.ts.map +0 -1
  115. package/dist/utility/string-proxy.js +0 -12
  116. package/dist/utility/string-proxy.js.map +0 -1
  117. package/dist/utility/transformer-descriptor.d.ts +0 -6
  118. package/dist/utility/transformer-descriptor.d.ts.map +0 -1
  119. package/dist/utility/transformer-descriptor.js +0 -24
  120. package/dist/utility/transformer-descriptor.js.map +0 -1
  121. package/dist/utility/transformer-proxy.d.ts +0 -8
  122. package/dist/utility/transformer-proxy.d.ts.map +0 -1
  123. package/dist/utility/transformer-proxy.js +0 -74
  124. package/dist/utility/transformer-proxy.js.map +0 -1
  125. package/src/generator/logger.ts +0 -45
  126. package/src/types.ts +0 -144
package/src/descriptor.ts CHANGED
@@ -1,11 +1,15 @@
1
- import type { AppExtension } from "./app-extension.js";
2
- import { LibProxy } from "./lib-proxy.js";
3
- import type { ErrorExtends, TypedFunction } from "./types.js";
1
+ import type { TypedFunction } from "@aidc-toolkit/core";
2
+ import type { AppExtension } from "./app-extension";
3
+ import { LibProxy } from "./lib-proxy";
4
+ import type { ErrorExtends } from "./type";
4
5
 
5
6
  /**
6
7
  * Core descriptor.
7
8
  */
8
9
  interface Descriptor {
10
+ /**
11
+ * Name.
12
+ */
9
13
  readonly name: string;
10
14
  }
11
15
 
@@ -167,12 +171,12 @@ type ProxyClassType<ThrowError extends boolean, TError extends ErrorExtends<Thro
167
171
  let pendingParameterDescriptors: ParameterDescriptor[] = [];
168
172
 
169
173
  /**
170
- * Class method descriptors, keyed on declaration class name and method name.
174
+ * Class method descriptors map, keyed on declaration class name and method name.
171
175
  */
172
176
  const classMethodsDescriptorsMap = new Map<string, MethodDescriptor[]>();
173
177
 
174
178
  /**
175
- * Class descriptors, keyed on declaration class name.
179
+ * Class descriptors map, keyed on declaration class name.
176
180
  */
177
181
  const classDescriptorsMap = new Map<string, ClassDescriptor>();
178
182
 
@@ -309,11 +313,11 @@ export function ProxyClass<ThrowError extends boolean, TError extends ErrorExten
309
313
  }
310
314
 
311
315
  /**
312
- * Get class descriptors.
316
+ * Get class descriptors map.
313
317
  *
314
318
  * @returns
315
- * Class descriptors.
319
+ * Class descriptors map.
316
320
  */
317
- export function getClassDescriptors(): ReadonlyMap<string, ClassDescriptor> {
321
+ export function getClassDescriptorsMap(): ReadonlyMap<string, ClassDescriptor> {
318
322
  return classDescriptorsMap;
319
323
  }
@@ -1,4 +1,4 @@
1
- import type { BaseParameterDescriptor, ClassDescriptor, MethodDescriptor } from "../descriptor.js";
1
+ import type { BaseParameterDescriptor, ClassDescriptor, MethodDescriptor } from "../descriptor";
2
2
 
3
3
  /**
4
4
  * Localization.
@@ -1,14 +1,14 @@
1
1
  import { I18nEnvironments } from "@aidc-toolkit/core";
2
2
  import type { ParseKeys } from "i18next";
3
- import { expandParameterDescriptor, getClassDescriptors } from "../descriptor.js";
4
- import { appExtensionResources, i18nAppExtensionInit, i18nextAppExtension } from "../locale/i18n.js";
3
+ import { expandParameterDescriptor, getClassDescriptorsMap } from "../descriptor";
4
+ import { appExtensionResources, i18nAppExtensionInit, i18nextAppExtension } from "../locale/i18n";
5
5
  import type {
6
6
  FunctionLocalization,
7
7
  Localization,
8
8
  ParameterLocalization,
9
9
  ProxyFunctionDescriptor,
10
10
  ProxyObjectDescriptor
11
- } from "./descriptor.js";
11
+ } from "./descriptor";
12
12
 
13
13
  /**
14
14
  * Abstract generator.
@@ -187,7 +187,7 @@ export abstract class Generator {
187
187
  this.initialize();
188
188
 
189
189
  try {
190
- for (const classDescriptor of getClassDescriptors().values()) {
190
+ for (const classDescriptor of getClassDescriptorsMap().values()) {
191
191
  const namespace = classDescriptor.namespace;
192
192
  const namespacePrefix = namespace === undefined ? "" : `${namespace}.`;
193
193
  const className = classDescriptor.name;
@@ -1,2 +1,2 @@
1
- export type * from "./descriptor.js";
2
- export * from "./generator.js";
1
+ export type * from "./descriptor";
2
+ export * from "./generator";
@@ -1,10 +1,9 @@
1
- import type { LocaleResources } from "@aidc-toolkit/core";
1
+ import { getLogger, type LocaleResources } from "@aidc-toolkit/core";
2
2
  import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
- import { expandParameterDescriptor, type ParameterDescriptor } from "../descriptor.js";
5
- import type { ProxyFunctionDescriptor } from "./descriptor.js";
6
- import { Generator } from "./generator.js";
7
- import { logger } from "./logger.js";
4
+ import { expandParameterDescriptor, type ParameterDescriptor } from "../descriptor";
5
+ import type { ProxyFunctionDescriptor } from "./descriptor";
6
+ import { Generator } from "./generator";
8
7
 
9
8
  /**
10
9
  * Parameters sequencer entry.
@@ -50,6 +49,11 @@ class LocaleResourcesGenerator extends Generator {
50
49
  */
51
50
  private static readonly IMPORT_PATH = "../app-extension/src/locale";
52
51
 
52
+ /**
53
+ * Logger.
54
+ */
55
+ private readonly _logger = getLogger();
56
+
53
57
  /**
54
58
  * Parameters sequencer.
55
59
  */
@@ -215,7 +219,7 @@ class LocaleResourcesGenerator extends Generator {
215
219
  * @returns
216
220
  * Merged locale resources.
217
221
  */
218
- private static merge(logChanges: boolean, parentKey: string, sourceLocaleResources: LocaleResources, destinationLocaleResources: LocaleResources, addMissing: boolean): LocaleResources {
222
+ private merge(logChanges: boolean, parentKey: string, sourceLocaleResources: LocaleResources, destinationLocaleResources: LocaleResources, addMissing: boolean): LocaleResources {
219
223
  // Some entries at the top are not part of the generator output.
220
224
  const deleteMissing = parentKey.length !== 0;
221
225
 
@@ -227,7 +231,7 @@ class LocaleResourcesGenerator extends Generator {
227
231
  if (!deleteMissing) {
228
232
  newDestinationLocaleResources[key] = destinationValue;
229
233
  } else if (logChanges) {
230
- logger.info(`Deleting ${parentKey}${key}...`);
234
+ this._logger.info(`Deleting ${parentKey}${key}...`);
231
235
  }
232
236
  }
233
237
  }
@@ -236,7 +240,7 @@ class LocaleResourcesGenerator extends Generator {
236
240
  if (!(key in destinationLocaleResources)) {
237
241
  if (addMissing) {
238
242
  if (logChanges) {
239
- logger.info(`Adding ${parentKey}${key}...`);
243
+ this._logger.info(`Adding ${parentKey}${key}...`);
240
244
  }
241
245
 
242
246
  newDestinationLocaleResources[key] = sourceValue;
@@ -245,7 +249,7 @@ class LocaleResourcesGenerator extends Generator {
245
249
  const destinationValue = destinationLocaleResources[key];
246
250
 
247
251
  if (typeof sourceValue === "object" && typeof destinationValue === "object") {
248
- newDestinationLocaleResources[key] = LocaleResourcesGenerator.merge(logChanges, `${parentKey}${key}.`, sourceValue, destinationValue, addMissing);
252
+ newDestinationLocaleResources[key] = this.merge(logChanges, `${parentKey}${key}.`, sourceValue, destinationValue, addMissing);
249
253
  } else if (typeof sourceValue === "string" && typeof destinationValue === "string") {
250
254
  newDestinationLocaleResources[key] = destinationValue;
251
255
  } else {
@@ -346,7 +350,7 @@ class LocaleResourcesGenerator extends Generator {
346
350
 
347
351
  await import(LocaleResourcesSource).then((module) => {
348
352
  // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Module format is known.
349
- const LocaleResources = LocaleResourcesGenerator.merge(entry.name === "en", "", this._LocaleResources, (module as LocaleResourcesModule).LocaleResources, !entry.name.includes("-"));
353
+ const LocaleResources = this.merge(entry.name === "en", "", this._LocaleResources, (module as LocaleResourcesModule).LocaleResources, !entry.name.includes("-"));
350
354
 
351
355
  fs.writeFileSync(LocaleResourcesSource, `${LocaleResourcesGenerator.buildOutput("export default", LocaleResources, 0)};\n`);
352
356
  });
@@ -1,12 +1,12 @@
1
1
  import { AI39_CREATOR, AI82_CREATOR } from "@aidc-toolkit/gs1";
2
- import type { AppExtension } from "../app-extension.js";
3
- import { expandParameterDescriptor, ProxyClass } from "../descriptor.js";
4
- import type { ErrorExtends } from "../types.js";
2
+ import type { AppExtension } from "../app-extension";
3
+ import { expandParameterDescriptor, ProxyClass } from "../descriptor";
4
+ import type { ErrorExtends } from "../type";
5
5
  import {
6
6
  exclusionAllNumericParameterDescriptor,
7
7
  exclusionNoneParameterDescriptor
8
- } from "../utility/character-set-descriptor.js";
9
- import { CharacterSetProxy } from "../utility/character-set-proxy.js";
8
+ } from "../utility/character-set-descriptor";
9
+ import { CharacterSetProxy } from "../utility";
10
10
 
11
11
  @ProxyClass({
12
12
  namespace: "GS1",
@@ -6,9 +6,9 @@ import {
6
6
  isValidPriceOrWeightCheckDigit,
7
7
  priceOrWeightCheckDigit
8
8
  } from "@aidc-toolkit/gs1";
9
- import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "../descriptor.js";
10
- import { LibProxy } from "../lib-proxy.js";
11
- import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../types.js";
9
+ import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "../descriptor";
10
+ import { LibProxy } from "../lib-proxy";
11
+ import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../type";
12
12
 
13
13
  const checkSParameterDescriptor: ParameterDescriptor = {
14
14
  name: "checkS",
@@ -1,3 +1,4 @@
1
+ import { isNullish, type Nullishable } from "@aidc-toolkit/core";
1
2
  import {
2
3
  CPID_VALIDATOR,
3
4
  GCN_VALIDATOR,
@@ -34,7 +35,7 @@ import {
34
35
  SSCC_VALIDATOR
35
36
  } from "@aidc-toolkit/gs1";
36
37
  import { Sequence } from "@aidc-toolkit/utility";
37
- import type { AppExtension } from "../app-extension.js";
38
+ import type { AppExtension } from "../app-extension";
38
39
  import {
39
40
  expandParameterDescriptor,
40
41
  type ParameterDescriptor,
@@ -42,17 +43,17 @@ import {
42
43
  ProxyMethod,
43
44
  ProxyParameter,
44
45
  Types
45
- } from "../descriptor.js";
46
- import { LibProxy } from "../lib-proxy.js";
47
- import { i18nextAppExtension } from "../locale/i18n.js";
48
- import { type ErrorExtends, isNullish, type Matrix, type MatrixResultError, type Nullishable } from "../types.js";
49
- import { exclusionAllNumericParameterDescriptor } from "../utility/character-set-descriptor.js";
50
- import { StringProxy } from "../utility/string-proxy.js";
46
+ } from "../descriptor";
47
+ import { LibProxy } from "../lib-proxy";
48
+ import { i18nextAppExtension } from "../locale/i18n";
49
+ import type { ErrorExtends, Matrix, MatrixResultError } from "../type";
50
+ import { exclusionAllNumericParameterDescriptor } from "../utility/character-set-descriptor";
51
+ import { StringProxy } from "../utility/string-proxy";
51
52
  import {
52
53
  countParameterDescriptor,
53
54
  startValueParameterDescriptor,
54
55
  valueParameterDescriptor
55
- } from "../utility/transformer-descriptor.js";
56
+ } from "../utility/transformer-descriptor";
56
57
 
57
58
  const identifierParameterDescriptor: ParameterDescriptor = {
58
59
  name: "identifier",
package/src/gs1/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./character-set-proxy.js";
2
- export * from "./check-proxy.js";
3
- export * from "./identifier-proxy.js";
1
+ export * from "./character-set-proxy";
2
+ export * from "./check-proxy";
3
+ export * from "./identifier-proxy";
package/src/index.ts CHANGED
@@ -14,12 +14,12 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- export * from "./locale/i18n.js";
18
- export * from "./types.js";
19
- export * from "./app-extension.js";
20
- export * from "./lib-proxy.js";
21
- export * from "./descriptor.js";
22
- export * from "./app-utility-proxy.js";
23
- export * from "./utility/index.js";
24
- export * as GS1 from "./gs1/index.js";
25
- export * from "./generator/index.js";
17
+ export * from "./locale/i18n";
18
+ export type * from "./type";
19
+ export * from "./app-extension";
20
+ export * from "./lib-proxy";
21
+ export * from "./descriptor";
22
+ export * from "./app-utility-proxy";
23
+ export * from "./utility/index";
24
+ export * as GS1 from "./gs1/index";
25
+ export * from "./generator/index";
package/src/lib-proxy.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { mapIterable } from "@aidc-toolkit/utility";
2
- import type { AppExtension } from "./app-extension.js";
3
- import { i18nextAppExtension } from "./locale/i18n.js";
4
- import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "./types.js";
2
+ import type { AppExtension } from "./app-extension";
3
+ import { i18nextAppExtension } from "./locale/i18n";
4
+ import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "./type";
5
5
 
6
6
  /**
7
7
  * Library proxy.
@@ -1,9 +1,9 @@
1
- import { i18nAssertValidResources, i18nCoreInit, type I18nEnvironment } from "@aidc-toolkit/core";
1
+ import { i18nCoreInit, type I18nEnvironment } from "@aidc-toolkit/core";
2
2
  import { gs1Resources, i18nGS1Init } from "@aidc-toolkit/gs1";
3
3
  import { i18nUtilityInit, utilityResources } from "@aidc-toolkit/utility";
4
4
  import i18next, { type i18n, type Resource } from "i18next";
5
- import enLocaleResources from "./en/locale-resources.js";
6
- import frLocaleResources from "./fr/locale-resources.js";
5
+ import enLocaleResources from "./en/locale-resources";
6
+ import frLocaleResources from "./fr/locale-resources";
7
7
 
8
8
  export const appExtensionNS = "aidct_app_extension";
9
9
 
@@ -12,8 +12,6 @@ export const appExtensionNS = "aidct_app_extension";
12
12
  */
13
13
  export type AppExtensionLocaleResources = typeof enLocaleResources;
14
14
 
15
- i18nAssertValidResources(enLocaleResources, "fr", frLocaleResources);
16
-
17
15
  /**
18
16
  * App extension resources.
19
17
  */
@@ -1,6 +1,6 @@
1
1
  import type { GS1LocaleResources } from "@aidc-toolkit/gs1";
2
2
  import type { UtilityLocaleResources } from "@aidc-toolkit/utility";
3
- import type { AppExtensionLocaleResources } from "./i18n.js";
3
+ import type { AppExtensionLocaleResources } from "./i18n";
4
4
 
5
5
  /**
6
6
  * Internationalization module.
@@ -6,6 +6,7 @@
6
6
  * If true, errors are reported through the throw/catch mechanism.
7
7
  */
8
8
  export type ErrorExtends<ThrowError extends boolean> = ThrowError extends true ? Error : object;
9
+
9
10
  /**
10
11
  * Sheet.
11
12
  */
@@ -15,6 +16,7 @@ export interface Sheet {
15
16
  */
16
17
  readonly name: string;
17
18
  }
19
+
18
20
  /**
19
21
  * Single cell address.
20
22
  */
@@ -23,16 +25,19 @@ export interface Address {
23
25
  * Zero-indexed row.
24
26
  */
25
27
  readonly rowIndex: number;
28
+
26
29
  /**
27
30
  * Zero-indexed column.
28
31
  */
29
32
  readonly columnIndex: number;
30
33
  }
34
+
31
35
  /**
32
36
  * Sheet address.
33
37
  */
34
38
  export interface SheetAddress extends Sheet, Address {
35
39
  }
40
+
36
41
  /**
37
42
  * Range of cells.
38
43
  */
@@ -41,16 +46,19 @@ export interface Range {
41
46
  * Start address, inclusive.
42
47
  */
43
48
  readonly startAddress: Address;
49
+
44
50
  /**
45
51
  * End address, exclusive.
46
52
  */
47
53
  readonly endAddress: Address;
48
54
  }
55
+
49
56
  /**
50
57
  * Sheet range.
51
58
  */
52
59
  export interface SheetRange extends Sheet, Range {
53
60
  }
61
+
54
62
  /**
55
63
  * Matrix type; shorthand for defining a two-dimensional matrix (array of array) of a type.
56
64
  *
@@ -58,6 +66,7 @@ export interface SheetRange extends Sheet, Range {
58
66
  * Type.
59
67
  */
60
68
  export type Matrix<T> = T[][];
69
+
61
70
  /**
62
71
  * Function result, possibly including an error result. If the application framework reports errors through the return
63
72
  * value, the result is the union of the result type and the error type; otherwise, it's just the result type.
@@ -72,6 +81,7 @@ export type Matrix<T> = T[][];
72
81
  * Error type.
73
82
  */
74
83
  export type ResultError<TResult, ThrowError extends boolean, TError extends ErrorExtends<ThrowError>> = ThrowError extends false ? TResult | TError : TResult;
84
+
75
85
  /**
76
86
  * Function result as matrix, possibly including an error result in each element. If the application framework reports
77
87
  * errors through the return value, the individual element result is the union of the result type and the error type;
@@ -87,41 +97,3 @@ export type ResultError<TResult, ThrowError extends boolean, TError extends Erro
87
97
  * Error type.
88
98
  */
89
99
  export type MatrixResultError<TResult, ThrowError extends boolean, TError extends ErrorExtends<ThrowError>> = Matrix<ResultError<TResult, ThrowError, TError>>;
90
- /**
91
- * Typed function, applicable to any function, stricter than {@link Function}.
92
- */
93
- export type TypedFunction<TMethod extends (...args: Parameters<TMethod>) => ReturnType<TMethod>> = (...args: Parameters<TMethod>) => ReturnType<TMethod>;
94
- /**
95
- * Typed synchronous function, applicable to any function that doesn't return a Promise.
96
- */
97
- export type TypedSyncFunction<TMethod extends TypedFunction<TMethod>> = [ReturnType<TMethod>] extends [PromiseLike<unknown>] ? never : TypedFunction<TMethod>;
98
- /**
99
- * Determine the fundamental promised type. This is stricter than `Awaited\<Type\>` in that it requires a Promise.
100
- */
101
- type PromisedType<T> = [T] extends [PromiseLike<infer TPromised>] ? TPromised : never;
102
- /**
103
- * Typed asynchronous function, applicable to any function that returns a Promise.
104
- */
105
- export type TypedAsyncFunction<TMethod extends (...args: Parameters<TMethod>) => PromiseLike<PromisedType<ReturnType<TMethod>>>> = (...args: Parameters<TMethod>) => Promise<PromisedType<ReturnType<TMethod>>>;
106
- /**
107
- * Nullishable type. Application extension may pass `null` or `undefined` to missing parameters.
108
- */
109
- export type Nullishable<T> = T | null | undefined;
110
- /**
111
- * Non-nullishable type. If T is an object type, it is spread and attributes within it are made non-nullishable.
112
- */
113
- export type NonNullishable<T> = T extends object ? {
114
- [P in keyof T]-?: NonNullishable<T[P]>;
115
- } : NonNullable<T>;
116
- /**
117
- * Determine if argument is nullish. Application extension may pass `null` or `undefined` to missing parameters.
118
- *
119
- * @param argument
120
- * Argument.
121
- *
122
- * @returns
123
- * True if argument is undefined or null.
124
- */
125
- export declare function isNullish<T>(argument: T | null | undefined): argument is null | undefined;
126
- export {};
127
- //# sourceMappingURL=types.d.ts.map
@@ -1,4 +1,4 @@
1
- import { type ParameterDescriptor, Types } from "../descriptor.js";
1
+ import { type ParameterDescriptor, Types } from "../descriptor";
2
2
 
3
3
  const exclusionParameterDescriptor: ParameterDescriptor = {
4
4
  name: "exclusion",
@@ -1,3 +1,4 @@
1
+ import type { Nullishable } from "@aidc-toolkit/core";
1
2
  import {
2
3
  ALPHABETIC_CREATOR,
3
4
  ALPHANUMERIC_CREATOR,
@@ -8,7 +9,7 @@ import {
8
9
  NUMERIC_CREATOR,
9
10
  Sequence
10
11
  } from "@aidc-toolkit/utility";
11
- import type { AppExtension } from "../app-extension.js";
12
+ import type { AppExtension } from "../app-extension";
12
13
  import {
13
14
  expandParameterDescriptor,
14
15
  type ParameterDescriptor,
@@ -16,22 +17,22 @@ import {
16
17
  ProxyMethod,
17
18
  ProxyParameter,
18
19
  Types
19
- } from "../descriptor.js";
20
- import { LibProxy } from "../lib-proxy.js";
21
- import type { ErrorExtends, Matrix, MatrixResultError, Nullishable, ResultError } from "../types.js";
20
+ } from "../descriptor";
21
+ import { LibProxy } from "../lib-proxy";
22
+ import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../type";
22
23
  import {
23
24
  exclusionAnyParameterDescriptor,
24
25
  exclusionFirstZeroParameterDescriptor,
25
26
  exclusionNoneParameterDescriptor
26
- } from "./character-set-descriptor.js";
27
- import { sParameterDescriptor, validateSParameterDescriptor } from "./string-descriptor.js";
28
- import { StringProxy } from "./string-proxy.js";
27
+ } from "./character-set-descriptor";
28
+ import { sParameterDescriptor, validateSParameterDescriptor } from "./string-descriptor";
29
+ import { StringProxy } from "./string-proxy";
29
30
  import {
30
31
  countParameterDescriptor,
31
32
  startValueParameterDescriptor,
32
33
  tweakParameterDescriptor,
33
34
  valueParameterDescriptor
34
- } from "./transformer-descriptor.js";
35
+ } from "./transformer-descriptor";
35
36
 
36
37
  const lengthParameterDescriptor: ParameterDescriptor = {
37
38
  name: "length",
@@ -1,3 +1,3 @@
1
- export * from "./transformer-proxy.js";
2
- export * from "./reg-exp-proxy.js";
3
- export * from "./character-set-proxy.js";
1
+ export * from "./transformer-proxy";
2
+ export * from "./reg-exp-proxy";
3
+ export * from "./character-set-proxy";
@@ -1,8 +1,9 @@
1
+ import type { Nullishable } from "@aidc-toolkit/core";
1
2
  import { RegExpValidator } from "@aidc-toolkit/utility";
2
- import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "../descriptor.js";
3
- import type { ErrorExtends, Matrix, MatrixResultError, Nullishable } from "../types.js";
4
- import { validateSParameterDescriptor } from "./string-descriptor.js";
5
- import { StringProxy } from "./string-proxy.js";
3
+ import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "../descriptor";
4
+ import type { ErrorExtends, Matrix, MatrixResultError } from "../type";
5
+ import { validateSParameterDescriptor } from "./string-descriptor";
6
+ import { StringProxy } from "./string-proxy";
6
7
 
7
8
  const regExpParameterDescriptor: ParameterDescriptor = {
8
9
  name: "regExp",
@@ -1,4 +1,4 @@
1
- import { type ParameterDescriptor, Types } from "../descriptor.js";
1
+ import { type ParameterDescriptor, Types } from "../descriptor";
2
2
 
3
3
  export const sParameterDescriptor: ParameterDescriptor = {
4
4
  name: "s",
@@ -1,6 +1,6 @@
1
1
  import type { StringValidation, StringValidator } from "@aidc-toolkit/utility";
2
- import { LibProxy } from "../lib-proxy.js";
3
- import type { ErrorExtends, Matrix, MatrixResultError } from "../types.js";
2
+ import { LibProxy } from "../lib-proxy";
3
+ import type { ErrorExtends, Matrix, MatrixResultError } from "../type";
4
4
 
5
5
  export abstract class StringProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TBigInt> {
6
6
  protected validateString<TStringValidation extends StringValidation>(validator: StringValidator<TStringValidation>, matrixSs: Matrix<string>, validation?: TStringValidation): Matrix<string> {
@@ -1,4 +1,4 @@
1
- import { type ParameterDescriptor, Types } from "../descriptor.js";
1
+ import { type ParameterDescriptor, Types } from "../descriptor";
2
2
 
3
3
  export const valueParameterDescriptor: ParameterDescriptor = {
4
4
  name: "value",
@@ -1,13 +1,14 @@
1
+ import type { Nullishable } from "@aidc-toolkit/core";
1
2
  import { mapIterable, Sequence, Transformer } from "@aidc-toolkit/utility";
2
- import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "../descriptor.js";
3
- import { LibProxy } from "../lib-proxy.js";
4
- import type { ErrorExtends, Matrix, MatrixResultError, Nullishable, ResultError } from "../types.js";
3
+ import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "../descriptor";
4
+ import { LibProxy } from "../lib-proxy";
5
+ import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../type";
5
6
  import {
6
7
  countParameterDescriptor,
7
8
  startValueParameterDescriptor,
8
9
  tweakParameterDescriptor,
9
10
  valueParameterDescriptor
10
- } from "./transformer-descriptor.js";
11
+ } from "./transformer-descriptor";
11
12
 
12
13
  const domainParameterDescriptor: ParameterDescriptor = {
13
14
  name: "domain",
package/tsup.config.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { tsupConfigAIDCToolkit } from "@aidc-toolkit/dev";
2
+
3
+ export default tsupConfigAIDCToolkit;