@aidc-toolkit/app-extension 1.0.25-beta → 1.0.26-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.
- package/dist/index.cjs +19 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/package.json +13 -8
- package/src/app-extension.ts +2 -2
- package/src/app-utility-proxy.ts +4 -4
- package/src/descriptor.ts +3 -3
- package/src/generator/descriptor.ts +1 -1
- package/src/generator/generator.ts +24 -6
- package/src/generator/index.ts +2 -2
- package/src/generator/locale-resources-generator.ts +9 -9
- package/src/gs1/character-set-proxy.ts +5 -5
- package/src/gs1/check-proxy.ts +3 -3
- package/src/gs1/identifier-proxy.ts +8 -8
- package/src/gs1/index.ts +3 -3
- package/src/index.ts +9 -9
- package/src/lib-proxy.ts +3 -3
- package/src/locale/i18n.ts +3 -3
- package/src/locale/i18next.d.ts +1 -1
- package/src/utility/character-set-descriptor.ts +1 -1
- package/src/utility/character-set-proxy.ts +8 -8
- package/src/utility/index.ts +3 -3
- package/src/utility/reg-exp-proxy.ts +4 -4
- package/src/utility/string-descriptor.ts +1 -1
- package/src/utility/string-proxy.ts +2 -2
- package/src/utility/transformer-descriptor.ts +1 -1
- package/src/utility/transformer-proxy.ts +4 -4
- package/tsconfig-config.json +4 -0
- package/tsconfig-src.json +11 -0
- package/tsconfig.json +9 -4
- package/tsup.config.ts +3 -2
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aidc-toolkit/app-extension",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26-beta",
|
|
4
4
|
"description": "Application extension framework for AIDC Toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"homepage": "https://aidc-toolkit.com/",
|
|
8
|
-
"repository":
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/aidc-toolkit/app-extension.git"
|
|
11
|
+
},
|
|
9
12
|
"bugs": {
|
|
10
13
|
"url": "https://github.com/aidc-toolkit/app-extension/issues"
|
|
11
14
|
},
|
|
@@ -16,19 +19,21 @@
|
|
|
16
19
|
"url": "https://www.linkedin.com/in/kdean"
|
|
17
20
|
},
|
|
18
21
|
"scripts": {
|
|
22
|
+
"locale-resources-generator": "tsx src/generator/locale-resources-generator.ts",
|
|
19
23
|
"lint": "eslint",
|
|
24
|
+
"tsc:core": "tsc --project tsconfig-src.json",
|
|
25
|
+
"build:devx": "rimraf dist && npm run tsc:core -- --declarationMap --sourceMap",
|
|
20
26
|
"build:dev": "tsup --define.mode=dev",
|
|
21
|
-
"build:release": "tsup",
|
|
27
|
+
"build:release": "npm run tsc:core -- --noEmit && tsup",
|
|
22
28
|
"build:doc": "npm run build:dev"
|
|
23
29
|
},
|
|
24
30
|
"devDependencies": {
|
|
25
|
-
"@aidc-toolkit/dev": "1.0.
|
|
26
|
-
"@types/node": "^24.10.1"
|
|
31
|
+
"@aidc-toolkit/dev": "1.0.26-beta"
|
|
27
32
|
},
|
|
28
33
|
"dependencies": {
|
|
29
|
-
"@aidc-toolkit/core": "1.0.
|
|
30
|
-
"@aidc-toolkit/gs1": "1.0.
|
|
31
|
-
"@aidc-toolkit/utility": "1.0.
|
|
34
|
+
"@aidc-toolkit/core": "1.0.26-beta",
|
|
35
|
+
"@aidc-toolkit/gs1": "1.0.26-beta",
|
|
36
|
+
"@aidc-toolkit/utility": "1.0.26-beta",
|
|
32
37
|
"i18next": "^25.7.1"
|
|
33
38
|
}
|
|
34
39
|
}
|
package/src/app-extension.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TypedAsyncFunction, TypedFunction, TypedSyncFunction } from "@aidc-toolkit/core";
|
|
2
|
-
import { i18nextAppExtension } from "./locale/i18n";
|
|
3
|
-
import type { ErrorExtends, ResultError, SheetAddress, SheetRange } from "./type";
|
|
2
|
+
import { i18nextAppExtension } from "./locale/i18n.js";
|
|
3
|
+
import type { ErrorExtends, ResultError, SheetAddress, SheetRange } from "./type.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Application extension.
|
package/src/app-utility-proxy.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isNullish, type NonNullishable, type Nullishable } from "@aidc-toolkit/core";
|
|
2
|
-
import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "./descriptor";
|
|
3
|
-
import { LibProxy } from "./lib-proxy";
|
|
4
|
-
import { i18nextAppExtension } from "./locale/i18n";
|
|
5
|
-
import type { ErrorExtends, Matrix } from "./type";
|
|
2
|
+
import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "./descriptor.js";
|
|
3
|
+
import { LibProxy } from "./lib-proxy.js";
|
|
4
|
+
import { i18nextAppExtension } from "./locale/i18n.js";
|
|
5
|
+
import type { ErrorExtends, Matrix } from "./type.js";
|
|
6
6
|
|
|
7
7
|
const spillMatrix: ParameterDescriptor = {
|
|
8
8
|
name: "spillMatrix",
|
package/src/descriptor.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
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";
|
|
2
|
+
import type { AppExtension } from "./app-extension.js";
|
|
3
|
+
import { LibProxy } from "./lib-proxy.js";
|
|
4
|
+
import type { ErrorExtends } from "./type.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Core descriptor.
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import { I18nEnvironments } from "@aidc-toolkit/core";
|
|
2
2
|
import type { ParseKeys } from "i18next";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { AppUtilityProxy } from "../app-utility-proxy.js";
|
|
4
|
+
import { expandParameterDescriptor, getClassDescriptorsMap } from "../descriptor.js";
|
|
5
|
+
import * as GS1 from "../gs1/index.js";
|
|
6
|
+
import { appExtensionResources, i18nAppExtensionInit, i18nextAppExtension } from "../locale/i18n.js";
|
|
7
|
+
import * as Utility from "../utility/index.js";
|
|
5
8
|
import type {
|
|
6
9
|
FunctionLocalization,
|
|
7
10
|
Localization,
|
|
8
11
|
ParameterLocalization,
|
|
9
12
|
ProxyFunctionDescriptor,
|
|
10
13
|
ProxyObjectDescriptor
|
|
11
|
-
} from "./descriptor";
|
|
14
|
+
} from "./descriptor.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Dummy method to force proxies to register their decorators.
|
|
18
|
+
*
|
|
19
|
+
* @param _proxies
|
|
20
|
+
* Proxies.
|
|
21
|
+
*/
|
|
22
|
+
function registerProxies(..._proxies: unknown[]): void {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
registerProxies(AppUtilityProxy, Utility, GS1);
|
|
12
26
|
|
|
13
27
|
/**
|
|
14
28
|
* Abstract generator.
|
|
@@ -89,7 +103,7 @@ export abstract class Generator {
|
|
|
89
103
|
const functionLocalization = this._functionLocalizationsMapsMap.get(namespaceFunctionName)?.get(locale);
|
|
90
104
|
|
|
91
105
|
if (functionLocalization === undefined) {
|
|
92
|
-
throw new Error(
|
|
106
|
+
throw new Error(`${locale} localization for function ${namespaceFunctionName} not found`);
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
return functionLocalization;
|
|
@@ -114,7 +128,7 @@ export abstract class Generator {
|
|
|
114
128
|
const parameterLocalization = this._parameterLocalizationsMapsMap.get(`${namespaceFunctionName}.${parameterName}`)?.get(locale);
|
|
115
129
|
|
|
116
130
|
if (parameterLocalization === undefined) {
|
|
117
|
-
throw new Error(
|
|
131
|
+
throw new Error(`${locale} localization for function ${namespaceFunctionName} parameter ${parameterName} not found`);
|
|
118
132
|
}
|
|
119
133
|
|
|
120
134
|
return parameterLocalization;
|
|
@@ -184,6 +198,10 @@ export abstract class Generator {
|
|
|
184
198
|
|
|
185
199
|
await i18nAppExtensionInit(I18nEnvironments.CLI);
|
|
186
200
|
|
|
201
|
+
// const LocaleResourcesSource = path.resolve(LocaleResourcesGenerator.IMPORT_PATH, entry.name, "locale-resources.ts");
|
|
202
|
+
//
|
|
203
|
+
// await import(LocaleResourcesSource).then((module) => {
|
|
204
|
+
|
|
187
205
|
this.initialize();
|
|
188
206
|
|
|
189
207
|
try {
|
|
@@ -237,7 +255,7 @@ export abstract class Generator {
|
|
|
237
255
|
const insertIndex = methodName.indexOf(infixBefore);
|
|
238
256
|
|
|
239
257
|
if (insertIndex === -1) {
|
|
240
|
-
throw new Error(`Cannot find "${infixBefore}" in method
|
|
258
|
+
throw new Error(`Cannot find "${infixBefore}" in method ${methodName}`);
|
|
241
259
|
}
|
|
242
260
|
|
|
243
261
|
// Other classes in the hierarchy and infix is in the middle of the string.
|
package/src/generator/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "./descriptor";
|
|
2
|
-
export * from "./generator";
|
|
1
|
+
export type * from "./descriptor.js";
|
|
2
|
+
export * from "./generator.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
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";
|
|
5
|
-
import type { ProxyFunctionDescriptor } from "./descriptor";
|
|
6
|
-
import { Generator } from "./generator";
|
|
4
|
+
import { expandParameterDescriptor, type ParameterDescriptor } from "../descriptor.js";
|
|
5
|
+
import type { ProxyFunctionDescriptor } from "./descriptor.js";
|
|
6
|
+
import { Generator } from "./generator.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Parameters sequencer entry.
|
|
@@ -37,7 +37,7 @@ interface LocaleResourcesModule {
|
|
|
37
37
|
/**
|
|
38
38
|
* Locale resources.
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
default: LocaleResources;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -188,7 +188,7 @@ class LocaleResourcesGenerator extends Generator {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
if (functionName in functionsLocaleResources) {
|
|
191
|
-
throw new Error(`Duplicate function
|
|
191
|
+
throw new Error(`Duplicate function ${functionName}`);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
// Add function.
|
|
@@ -346,13 +346,13 @@ class LocaleResourcesGenerator extends Generator {
|
|
|
346
346
|
await Promise.all(fs.readdirSync(LocaleResourcesGenerator.IMPORT_PATH, {
|
|
347
347
|
withFileTypes: true
|
|
348
348
|
}).filter(entry => entry.isDirectory()).map(async (entry) => {
|
|
349
|
-
const
|
|
349
|
+
const localeResourcesSource = path.resolve(LocaleResourcesGenerator.IMPORT_PATH, entry.name, "locale-resources.ts");
|
|
350
350
|
|
|
351
|
-
await import(
|
|
351
|
+
await import(localeResourcesSource).then((module) => {
|
|
352
352
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Module format is known.
|
|
353
|
-
const
|
|
353
|
+
const localeResources = this.merge(entry.name === "en", "", this._LocaleResources, (module as LocaleResourcesModule).default, !entry.name.includes("-"));
|
|
354
354
|
|
|
355
|
-
fs.writeFileSync(
|
|
355
|
+
fs.writeFileSync(localeResourcesSource, `${LocaleResourcesGenerator.buildOutput("export default", localeResources, 0)};\n`);
|
|
356
356
|
});
|
|
357
357
|
}));
|
|
358
358
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AI39_CREATOR, AI64_VALIDATOR, AI82_CREATOR } from "@aidc-toolkit/gs1";
|
|
2
|
-
import type { AppExtension } from "../app-extension";
|
|
3
|
-
import { expandParameterDescriptor, ProxyClass } from "../descriptor";
|
|
4
|
-
import type { ErrorExtends } from "../type";
|
|
5
|
-
import { CharacterSetCreatorProxy, CharacterSetValidatorProxy } from "../utility";
|
|
2
|
+
import type { AppExtension } from "../app-extension.js";
|
|
3
|
+
import { expandParameterDescriptor, ProxyClass } from "../descriptor.js";
|
|
4
|
+
import type { ErrorExtends } from "../type.js";
|
|
5
|
+
import { CharacterSetCreatorProxy, CharacterSetValidatorProxy } from "../utility/index.js";
|
|
6
6
|
import {
|
|
7
7
|
exclusionAllNumericParameterDescriptor,
|
|
8
8
|
exclusionNoneParameterDescriptor
|
|
9
|
-
} from "../utility/character-set-descriptor";
|
|
9
|
+
} from "../utility/character-set-descriptor.js";
|
|
10
10
|
|
|
11
11
|
@ProxyClass({
|
|
12
12
|
namespace: "GS1",
|
package/src/gs1/check-proxy.ts
CHANGED
|
@@ -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";
|
|
10
|
-
import { LibProxy } from "../lib-proxy";
|
|
11
|
-
import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../type";
|
|
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 "../type.js";
|
|
12
12
|
|
|
13
13
|
const checkSParameterDescriptor: ParameterDescriptor = {
|
|
14
14
|
name: "checkS",
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
type SerializableNumericIdentifierType
|
|
33
33
|
} from "@aidc-toolkit/gs1";
|
|
34
34
|
import { Sequence } from "@aidc-toolkit/utility";
|
|
35
|
-
import type { AppExtension } from "../app-extension";
|
|
35
|
+
import type { AppExtension } from "../app-extension.js";
|
|
36
36
|
import {
|
|
37
37
|
expandParameterDescriptor,
|
|
38
38
|
type ParameterDescriptor,
|
|
@@ -40,17 +40,17 @@ import {
|
|
|
40
40
|
ProxyMethod,
|
|
41
41
|
ProxyParameter,
|
|
42
42
|
Types
|
|
43
|
-
} from "../descriptor";
|
|
44
|
-
import { LibProxy } from "../lib-proxy";
|
|
45
|
-
import { i18nextAppExtension } from "../locale/i18n";
|
|
46
|
-
import type { ErrorExtends, Matrix, MatrixResultError } from "../type";
|
|
47
|
-
import { exclusionAllNumericParameterDescriptor } from "../utility/character-set-descriptor";
|
|
48
|
-
import { StringProxy } from "../utility/string-proxy";
|
|
43
|
+
} from "../descriptor.js";
|
|
44
|
+
import { LibProxy } from "../lib-proxy.js";
|
|
45
|
+
import { i18nextAppExtension } from "../locale/i18n.js";
|
|
46
|
+
import type { ErrorExtends, Matrix, MatrixResultError } from "../type.js";
|
|
47
|
+
import { exclusionAllNumericParameterDescriptor } from "../utility/character-set-descriptor.js";
|
|
48
|
+
import { StringProxy } from "../utility/string-proxy.js";
|
|
49
49
|
import {
|
|
50
50
|
countParameterDescriptor,
|
|
51
51
|
startValueParameterDescriptor,
|
|
52
52
|
valueParameterDescriptor
|
|
53
|
-
} from "../utility/transformer-descriptor";
|
|
53
|
+
} from "../utility/transformer-descriptor.js";
|
|
54
54
|
|
|
55
55
|
const identifierParameterDescriptor: ParameterDescriptor = {
|
|
56
56
|
name: "identifier",
|
package/src/gs1/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./character-set-proxy";
|
|
2
|
-
export * from "./check-proxy";
|
|
3
|
-
export * from "./identifier-proxy";
|
|
1
|
+
export * from "./character-set-proxy.js";
|
|
2
|
+
export * from "./check-proxy.js";
|
|
3
|
+
export * from "./identifier-proxy.js";
|
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";
|
|
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";
|
|
17
|
+
export * from "./locale/i18n.js";
|
|
18
|
+
export type * from "./type.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";
|
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";
|
|
3
|
-
import { i18nextAppExtension } from "./locale/i18n";
|
|
4
|
-
import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "./type";
|
|
2
|
+
import type { AppExtension } from "./app-extension.js";
|
|
3
|
+
import { i18nextAppExtension } from "./locale/i18n.js";
|
|
4
|
+
import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "./type.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Library proxy.
|
package/src/locale/i18n.ts
CHANGED
|
@@ -2,8 +2,8 @@ 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";
|
|
6
|
-
import frLocaleResources from "./fr/locale-resources";
|
|
5
|
+
import enLocaleResources from "./en/locale-resources.js";
|
|
6
|
+
import frLocaleResources from "./fr/locale-resources.js";
|
|
7
7
|
|
|
8
8
|
export const appExtensionNS = "aidct_app_extension";
|
|
9
9
|
|
|
@@ -24,7 +24,7 @@ export const appExtensionResources: Resource = {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
// Explicit type is necessary
|
|
27
|
+
// Explicit type is necessary because type can't be inferred without additional references.
|
|
28
28
|
export const i18nextAppExtension: i18n = i18next.createInstance();
|
|
29
29
|
|
|
30
30
|
/**
|
package/src/locale/i18next.d.ts
CHANGED
|
@@ -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";
|
|
3
|
+
import type { AppExtensionLocaleResources } from "./i18n.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Internationalization module.
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
NUMERIC_CREATOR,
|
|
11
11
|
Sequence
|
|
12
12
|
} from "@aidc-toolkit/utility";
|
|
13
|
-
import type { AppExtension } from "../app-extension";
|
|
13
|
+
import type { AppExtension } from "../app-extension.js";
|
|
14
14
|
import {
|
|
15
15
|
expandParameterDescriptor,
|
|
16
16
|
type ParameterDescriptor,
|
|
@@ -18,22 +18,22 @@ import {
|
|
|
18
18
|
ProxyMethod,
|
|
19
19
|
ProxyParameter,
|
|
20
20
|
Types
|
|
21
|
-
} from "../descriptor";
|
|
22
|
-
import { LibProxy } from "../lib-proxy";
|
|
23
|
-
import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../type";
|
|
21
|
+
} from "../descriptor.js";
|
|
22
|
+
import { LibProxy } from "../lib-proxy.js";
|
|
23
|
+
import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../type.js";
|
|
24
24
|
import {
|
|
25
25
|
exclusionAnyParameterDescriptor,
|
|
26
26
|
exclusionFirstZeroParameterDescriptor,
|
|
27
27
|
exclusionNoneParameterDescriptor
|
|
28
|
-
} from "./character-set-descriptor";
|
|
29
|
-
import { sParameterDescriptor, validateSParameterDescriptor } from "./string-descriptor";
|
|
30
|
-
import { StringProxy } from "./string-proxy";
|
|
28
|
+
} from "./character-set-descriptor.js";
|
|
29
|
+
import { sParameterDescriptor, validateSParameterDescriptor } from "./string-descriptor.js";
|
|
30
|
+
import { StringProxy } from "./string-proxy.js";
|
|
31
31
|
import {
|
|
32
32
|
countParameterDescriptor,
|
|
33
33
|
startValueParameterDescriptor,
|
|
34
34
|
tweakParameterDescriptor,
|
|
35
35
|
valueParameterDescriptor
|
|
36
|
-
} from "./transformer-descriptor";
|
|
36
|
+
} from "./transformer-descriptor.js";
|
|
37
37
|
|
|
38
38
|
const lengthParameterDescriptor: ParameterDescriptor = {
|
|
39
39
|
name: "length",
|
package/src/utility/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./transformer-proxy";
|
|
2
|
-
export * from "./reg-exp-proxy";
|
|
3
|
-
export * from "./character-set-proxy";
|
|
1
|
+
export * from "./transformer-proxy.js";
|
|
2
|
+
export * from "./reg-exp-proxy.js";
|
|
3
|
+
export * from "./character-set-proxy.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Nullishable } from "@aidc-toolkit/core";
|
|
2
2
|
import { RegExpValidator } from "@aidc-toolkit/utility";
|
|
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";
|
|
3
|
+
import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "../descriptor.js";
|
|
4
|
+
import type { ErrorExtends, Matrix, MatrixResultError } from "../type.js";
|
|
5
|
+
import { validateSParameterDescriptor } from "./string-descriptor.js";
|
|
6
|
+
import { StringProxy } from "./string-proxy.js";
|
|
7
7
|
|
|
8
8
|
const regExpParameterDescriptor: ParameterDescriptor = {
|
|
9
9
|
name: "regExp",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StringValidation, StringValidator } from "@aidc-toolkit/utility";
|
|
2
|
-
import { LibProxy } from "../lib-proxy";
|
|
3
|
-
import type { ErrorExtends, Matrix, MatrixResultError } from "../type";
|
|
2
|
+
import { LibProxy } from "../lib-proxy.js";
|
|
3
|
+
import type { ErrorExtends, Matrix, MatrixResultError } from "../type.js";
|
|
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,14 +1,14 @@
|
|
|
1
1
|
import type { Nullishable } from "@aidc-toolkit/core";
|
|
2
2
|
import { mapIterable, Sequence, Transformer } from "@aidc-toolkit/utility";
|
|
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";
|
|
3
|
+
import { type ParameterDescriptor, ProxyClass, ProxyMethod, ProxyParameter, Types } from "../descriptor.js";
|
|
4
|
+
import { LibProxy } from "../lib-proxy.js";
|
|
5
|
+
import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../type.js";
|
|
6
6
|
import {
|
|
7
7
|
countParameterDescriptor,
|
|
8
8
|
startValueParameterDescriptor,
|
|
9
9
|
tweakParameterDescriptor,
|
|
10
10
|
valueParameterDescriptor
|
|
11
|
-
} from "./transformer-descriptor";
|
|
11
|
+
} from "./transformer-descriptor.js";
|
|
12
12
|
|
|
13
13
|
const domainParameterDescriptor: ParameterDescriptor = {
|
|
14
14
|
name: "domain",
|
package/tsconfig.json
CHANGED
package/tsup.config.ts
CHANGED