libmodulor 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +1 -1
- package/dist/esm/apps/Helper/src/i18n.js +4 -4
- package/dist/esm/apps/Helper/src/lib/layers/project.js +7 -7
- package/dist/esm/apps/Helper/src/lib/layers/uc.js +1 -1
- package/dist/esm/apps/Helper/src/ucds/CreateAppUCD.js +5 -10
- package/dist/esm/apps/Helper/src/ucds/CreateProductUCD.js +5 -10
- package/dist/esm/apps/Helper/src/ucds/CreateTargetUCD.js +6 -11
- package/dist/esm/apps/Helper/src/ucds/TestAppUCD.js +5 -8
- package/dist/esm/convention.d.ts +1 -1
- package/dist/esm/convention.js +1 -1
- package/dist/esm/dt/DataType.d.ts +2 -1
- package/dist/esm/dt/DataTypes.d.ts +1 -1
- package/dist/esm/dt/DataTypes.js +1 -0
- package/dist/esm/dt/final/TErrorCode.d.ts +7 -0
- package/dist/esm/dt/final/TErrorCode.js +9 -0
- package/dist/esm/dt/index.d.ts +1 -0
- package/dist/esm/dt/index.js +1 -0
- package/dist/esm/error/CustomError.d.ts +1 -1
- package/dist/esm/error/CustomError.js +2 -2
- package/dist/esm/error/ForbiddenAsNotFoundError.js +1 -1
- package/dist/esm/error/ForbiddenError.js +1 -1
- package/dist/esm/error/IllegalArgumentError.js +2 -2
- package/dist/esm/error/InternalServerError.js +1 -1
- package/dist/esm/error/NotFoundError.js +1 -1
- package/dist/esm/error/UnauthorizedError.js +1 -1
- package/dist/esm/error/UnavailableError.d.ts +6 -0
- package/dist/esm/error/UnavailableError.js +9 -0
- package/dist/esm/error/funcs.js +2 -0
- package/dist/esm/error/index.d.ts +1 -0
- package/dist/esm/error/index.js +1 -0
- package/dist/esm/i18n/locales/de.js +8 -0
- package/dist/esm/i18n/locales/en.js +8 -0
- package/dist/esm/i18n/locales/es.js +8 -0
- package/dist/esm/i18n/locales/fr.js +8 -0
- package/dist/esm/i18n/types.d.ts +1 -1
- package/dist/esm/products/Helper/i18n.d.ts +8 -0
- package/dist/esm/std/impl/SimpleHTTPAPICaller.js +1 -1
- package/dist/esm/target/lib/cli/CommandExecutor.js +2 -2
- package/dist/esm/target/lib/cli/renderer.d.ts +2 -1
- package/dist/esm/target/lib/cli/renderer.js +10 -11
- package/dist/esm/target/lib/server/AuthenticationChecker.d.ts +3 -3
- package/dist/esm/target/lib/server/AuthenticationChecker.js +5 -5
- package/dist/esm/target/node-core-cli/NodeCoreCLIManager.js +1 -1
- package/dist/esm/target/react-web-pure/UCForm.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCForm.js +3 -2
- package/dist/esm/testing/workers/checkers/AppI18nChecker.js +4 -2
- package/dist/esm/uc/data-store.d.ts +9 -1
- package/dist/esm/uc/data-store.js +33 -1
- package/dist/esm/uc/impl/CloudflareD1UCDataStore.d.ts +2 -2
- package/dist/esm/uc/impl/CloudflareD1UCDataStore.js +7 -0
- package/dist/esm/uc/impl/InMemoryUCDataStore.d.ts +8 -3
- package/dist/esm/uc/impl/InMemoryUCDataStore.js +19 -3
- package/dist/esm/uc/impl/KnexUCDataStore.d.ts +2 -2
- package/dist/esm/uc/impl/KnexUCDataStore.js +10 -2
- package/dist/esm/uc/impl/SimpleUCManager.d.ts +4 -4
- package/dist/esm/uc/impl/SimpleUCManager.js +10 -10
- package/dist/esm/uc/settings/consts.js +1 -0
- package/dist/esm/uc/settings.d.ts +8 -1
- package/dist/esm/uc/workers/UCExecChecker.d.ts +3 -3
- package/dist/esm/uc/workers/UCExecChecker.js +5 -5
- package/dist/esm/utils/index.d.ts +1 -1
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/ioc/bindCommon.js +4 -4
- package/dist/esm/utils/ioc/bindFactory.d.ts +2 -0
- package/dist/esm/utils/ioc/bindFactory.js +9 -0
- package/package.json +21 -20
- package/dist/esm/apps/Helper/src/lib/app.d.ts +0 -6
- package/dist/esm/apps/Helper/src/lib/app.js +0 -12
- package/dist/esm/apps/Helper/src/lib/project.d.ts +0 -3
- package/dist/esm/apps/Helper/src/lib/project.js +0 -163
- package/dist/esm/bundlers/vite/StripUCDLifecycleServerPlugin.d.ts +0 -2
- package/dist/esm/bundlers/vite/StripUCDLifecycleServerPlugin.js +0 -18
- package/dist/esm/products/Helper/cli-node-core/container.d.ts +0 -3
- package/dist/esm/products/Helper/cli-node-core/container.js +0 -26
- package/dist/esm/products/Helper/cli-node-core/index.d.ts +0 -1
- package/dist/esm/products/Helper/cli-node-core/index.js +0 -9
- package/dist/esm/products/Helper/container.d.ts +0 -3
- package/dist/esm/products/Helper/container.js +0 -26
- package/dist/esm/products/Helper/index.d.ts +0 -1
- package/dist/esm/products/Helper/index.js +0 -16
- package/dist/esm/target/lib/react/common.d.ts +0 -6
- package/dist/esm/target/lib/react/common.js +0 -1
- package/dist/esm/target/lib/server/RequestHandler.d.ts +0 -14
- package/dist/esm/target/lib/server/RequestHandler.js +0 -1
- package/dist/esm/target/lib/server-node/stop.d.ts +0 -2
- package/dist/esm/target/lib/server-node/stop.js +0 -18
- package/dist/esm/target/node-express-server/lib/AuthCookieCreator.d.ts +0 -21
- package/dist/esm/target/node-express-server/lib/AuthCookieCreator.js +0 -50
- package/dist/esm/target/node-express-server/middlewares/AuthenticationCheckerMiddlewareBuilder.d.ts +0 -21
- package/dist/esm/target/node-express-server/middlewares/AuthenticationCheckerMiddlewareBuilder.js +0 -61
- package/dist/esm/target/node-express-server/middlewares/ErrorMiddlewareBuilder.d.ts +0 -12
- package/dist/esm/target/node-express-server/middlewares/ErrorMiddlewareBuilder.js +0 -35
- package/dist/esm/target/node-express-server/middlewares/HelmetMiddlewareBuilder.d.ts +0 -12
- package/dist/esm/target/node-express-server/middlewares/HelmetMiddlewareBuilder.js +0 -39
- package/dist/esm/target/node-express-server/middlewares/PublicApiKeyCheckerMiddlewareBuilder.d.ts +0 -18
- package/dist/esm/target/node-express-server/middlewares/PublicApiKeyCheckerMiddlewareBuilder.js +0 -44
- package/dist/esm/target/node-express-server/middlewares/RequestCheckerMiddlewareBuilder.d.ts +0 -12
- package/dist/esm/target/node-express-server/middlewares/RequestCheckerMiddlewareBuilder.js +0 -36
- package/dist/esm/target/node-express-server/middlewares/RequestHandlerMiddlewareBuilder.d.ts +0 -23
- package/dist/esm/target/node-express-server/middlewares/RequestHandlerMiddlewareBuilder.js +0 -154
- package/dist/esm/target/node-express-server/middlewares/RequestLoggerMiddlewareBuilder.d.ts +0 -13
- package/dist/esm/target/node-express-server/middlewares/RequestLoggerMiddlewareBuilder.js +0 -46
- package/dist/esm/testing/impl/SimpleAppDocsEmitter.d.ts +0 -7
- package/dist/esm/testing/impl/SimpleAppDocsEmitter.js +0 -180
- package/dist/esm/testing/impl/SimpleAppTesterConfigurator.d.ts +0 -14
- package/dist/esm/testing/impl/SimpleAppTesterConfigurator.js +0 -35
- package/dist/esm/uc/utils/stripUCDLifecycleServer.d.ts +0 -15
- package/dist/esm/uc/utils/stripUCDLifecycleServer.js +0 -77
- package/dist/esm/uc/utils/ucifcoIsForArray.d.ts +0 -8
- package/dist/esm/uc/utils/ucifcoIsForArray.js +0 -13
- package/dist/esm/utils/bundling/vite/StripUCDLifecycleServerPlugin.d.ts +0 -2
- package/dist/esm/utils/bundling/vite/StripUCDLifecycleServerPlugin.js +0 -18
- package/dist/esm/utils/http/toFormData.d.ts +0 -3
- package/dist/esm/utils/http/toFormData.js +0 -4
- package/dist/esm/utils/http/toJSON.d.ts +0 -3
- package/dist/esm/utils/http/toJSON.js +0 -3
- package/dist/esm/utils/http/toQueryParams.d.ts +0 -2
- package/dist/esm/utils/http/toQueryParams.js +0 -4
- package/dist/esm/utils/ioc/ContainerPrinter.d.ts +0 -15
- package/dist/esm/utils/ioc/ContainerPrinter.js +0 -58
- package/dist/esm/utils/ioc/bindProvider.d.ts +0 -2
- package/dist/esm/utils/ioc/bindProvider.js +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v0.28.0 (2026-05-01)
|
|
4
|
+
|
|
5
|
+
Replace `Provider` by `Factory` in Dependency Injection (`inversify`). If you're using `bindProvider`, simply replace it by `bindFactory`.
|
|
6
|
+
|
|
7
|
+
Allow '...' at the end of a uc label. Although a label ending with '.' is odd, one ending with '...' is not (e.g. "Connect...").
|
|
8
|
+
|
|
9
|
+
Introduce `UCDataStoreMode` setting. It allows to to set it to `READ_WRITE` (default), `READ`, `WRITE` or `NONE`.
|
|
10
|
+
For instance, it's very useful to set it to `READ` when planning a migration with different DB engines.
|
|
11
|
+
In addition to that, `NONE` is convenient to prevent all reads and writes when there is an issue.
|
|
12
|
+
In these cases, the users receive a clear and proper error.
|
|
13
|
+
|
|
14
|
+
Fix an issue where the form would reset even when not success on the react target.
|
|
15
|
+
|
|
16
|
+
Bumped `typescript` to 6.0.x.
|
|
17
|
+
|
|
18
|
+
**BREAKING** : Handle errors i18n client side.
|
|
19
|
+
From now on, the server returns error codes (e.g. `err_forbidden` instead of `Forbidden`) and all translations must happen client side.
|
|
20
|
+
We recommend replacing all the instances of translated errors in all server code like so `throw new IllegalArgumentError(this.i18nManager.t('err_some_error'))` by `throw new IllegalArgumentError('err_some_error')`.
|
|
21
|
+
It's now up to the client to translate according to the current locale.
|
|
22
|
+
|
|
23
|
+
See all the changes here : https://github.com/c100k/libmodulor/compare/v0.27.0...master
|
|
24
|
+
|
|
25
|
+
## v0.27.0 (2026-02-09)
|
|
26
|
+
|
|
27
|
+
**Highlights**
|
|
28
|
+
|
|
29
|
+
Use triple slash `///` as doc comment in use cases to be more aligned with the standards. Using this comment makes it appear in the sequence diagrams automatically generated for each use case.
|
|
30
|
+
|
|
31
|
+
See all the changes here : https://github.com/c100k/libmodulor/compare/v0.26.0...master
|
|
32
|
+
|
|
3
33
|
## v0.26.0 (2026-01-01)
|
|
4
34
|
|
|
5
35
|
**Highlights**
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const I18n = {
|
|
2
2
|
en: {
|
|
3
|
-
err_existing_app: 'App
|
|
4
|
-
err_existing_product: 'Product
|
|
5
|
-
err_existing_target: 'Target
|
|
3
|
+
err_existing_app: 'App already exists',
|
|
4
|
+
err_existing_product: 'Product already exists',
|
|
5
|
+
err_existing_target: 'Target already exists',
|
|
6
6
|
err_target_generator_not_available: 'This target has not been implemented yet via the generator. In the meantime, you can create it manually by following the examples.',
|
|
7
|
-
err_unknown_app: 'App
|
|
7
|
+
err_unknown_app: 'App does not exist',
|
|
8
8
|
uc_CreateApp_desc: 'Create the basics of an app (index, i18n, manifest)',
|
|
9
9
|
uc_CreateApp_label: 'Create an app',
|
|
10
10
|
uc_CreateProduct_desc: 'Create the basics of a product (i18n, manifest)',
|
|
@@ -82,23 +82,23 @@ export const PACKAGE_JSON = (name) => `{
|
|
|
82
82
|
"test": "tsc && vitest run --passWithNoTests"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"inversify": "^7.
|
|
85
|
+
"inversify": "^7.11.0",
|
|
86
86
|
"libmodulor": "latest",
|
|
87
87
|
"reflect-metadata": "^0.2.2"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@biomejs/biome": "^2.
|
|
91
|
-
"@types/node": "^25.0
|
|
90
|
+
"@biomejs/biome": "^2.4.12",
|
|
91
|
+
"@types/node": "^25.6.0",
|
|
92
92
|
"@vitest/coverage-v8": "^3.2.4",
|
|
93
93
|
"buffer": "^6.0.3",
|
|
94
94
|
"cookie-parser": "^1.4.7",
|
|
95
95
|
"express": "^5.2.1",
|
|
96
96
|
"express-fileupload": "^1.5.2",
|
|
97
|
-
"fast-check": "^4.
|
|
97
|
+
"fast-check": "^4.7.0",
|
|
98
98
|
"helmet": "^8.1.0",
|
|
99
|
-
"jose": "^6.
|
|
100
|
-
"typescript": "^
|
|
101
|
-
"vite": "^6.4.
|
|
99
|
+
"jose": "^6.2.2",
|
|
100
|
+
"typescript": "^6.0.3",
|
|
101
|
+
"vite": "^6.4.2",
|
|
102
102
|
"vitest": "^3.2.4"
|
|
103
103
|
}
|
|
104
104
|
}
|
|
@@ -90,7 +90,7 @@ export class ${name}${UC_MAIN_SERVER_SUFFIX}
|
|
|
90
90
|
> {
|
|
91
91
|
const ${FIELD_NAME} = uc.reqVal0('${FIELD_NAME}');
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
/// Save in data store
|
|
94
94
|
const { aggregateId } = await this.ucManager.persist(uc);
|
|
95
95
|
|
|
96
96
|
return new UCOutputBuilder<${name}${UC_OPI0_SUFFIX}>()
|
|
@@ -23,13 +23,11 @@ import { SrcFilesGenerator } from '../lib/SrcFilesGenerator.js';
|
|
|
23
23
|
import { Manifest } from '../manifest.js';
|
|
24
24
|
let CreateAppClientMain = class CreateAppClientMain {
|
|
25
25
|
fsManager;
|
|
26
|
-
i18nManager;
|
|
27
26
|
logger;
|
|
28
27
|
srcFilesGenerator;
|
|
29
28
|
rootPath;
|
|
30
|
-
constructor(fsManager,
|
|
29
|
+
constructor(fsManager, logger, srcFilesGenerator) {
|
|
31
30
|
this.fsManager = fsManager;
|
|
32
|
-
this.i18nManager = i18nManager;
|
|
33
31
|
this.logger = logger;
|
|
34
32
|
this.srcFilesGenerator = srcFilesGenerator;
|
|
35
33
|
}
|
|
@@ -51,9 +49,7 @@ let CreateAppClientMain = class CreateAppClientMain {
|
|
|
51
49
|
if (!(await this.fsManager.exists(this.rootPath))) {
|
|
52
50
|
return;
|
|
53
51
|
}
|
|
54
|
-
throw new IllegalArgumentError(
|
|
55
|
-
vars: { appPath: this.rootPath },
|
|
56
|
-
}));
|
|
52
|
+
throw new IllegalArgumentError('err_existing_app');
|
|
57
53
|
}
|
|
58
54
|
async createRootDir() {
|
|
59
55
|
this.logger.info('Creating root dir : %s', this.rootPath);
|
|
@@ -70,10 +66,9 @@ let CreateAppClientMain = class CreateAppClientMain {
|
|
|
70
66
|
CreateAppClientMain = __decorate([
|
|
71
67
|
injectable(),
|
|
72
68
|
__param(0, inject('FSManager')),
|
|
73
|
-
__param(1, inject('
|
|
74
|
-
__param(2, inject(
|
|
75
|
-
|
|
76
|
-
__metadata("design:paramtypes", [Object, Object, Object, SrcFilesGenerator])
|
|
69
|
+
__param(1, inject('Logger')),
|
|
70
|
+
__param(2, inject(SrcFilesGenerator)),
|
|
71
|
+
__metadata("design:paramtypes", [Object, Object, SrcFilesGenerator])
|
|
77
72
|
], CreateAppClientMain);
|
|
78
73
|
export const CreateAppUCD = {
|
|
79
74
|
ext: {
|
|
@@ -23,13 +23,11 @@ import { SrcFilesGenerator } from '../lib/SrcFilesGenerator.js';
|
|
|
23
23
|
import { Manifest } from '../manifest.js';
|
|
24
24
|
let CreateProductClientMain = class CreateProductClientMain {
|
|
25
25
|
fsManager;
|
|
26
|
-
i18nManager;
|
|
27
26
|
logger;
|
|
28
27
|
srcFilesGenerator;
|
|
29
28
|
rootPath;
|
|
30
|
-
constructor(fsManager,
|
|
29
|
+
constructor(fsManager, logger, srcFilesGenerator) {
|
|
31
30
|
this.fsManager = fsManager;
|
|
32
|
-
this.i18nManager = i18nManager;
|
|
33
31
|
this.logger = logger;
|
|
34
32
|
this.srcFilesGenerator = srcFilesGenerator;
|
|
35
33
|
}
|
|
@@ -51,9 +49,7 @@ let CreateProductClientMain = class CreateProductClientMain {
|
|
|
51
49
|
if (!(await this.fsManager.exists(this.rootPath))) {
|
|
52
50
|
return;
|
|
53
51
|
}
|
|
54
|
-
throw new IllegalArgumentError(
|
|
55
|
-
vars: { productPath: this.rootPath },
|
|
56
|
-
}));
|
|
52
|
+
throw new IllegalArgumentError('err_existing_product');
|
|
57
53
|
}
|
|
58
54
|
async createRootDir() {
|
|
59
55
|
this.logger.info('Creating root dir : %s', this.rootPath);
|
|
@@ -70,10 +66,9 @@ let CreateProductClientMain = class CreateProductClientMain {
|
|
|
70
66
|
CreateProductClientMain = __decorate([
|
|
71
67
|
injectable(),
|
|
72
68
|
__param(0, inject('FSManager')),
|
|
73
|
-
__param(1, inject('
|
|
74
|
-
__param(2, inject(
|
|
75
|
-
|
|
76
|
-
__metadata("design:paramtypes", [Object, Object, Object, SrcFilesGenerator])
|
|
69
|
+
__param(1, inject('Logger')),
|
|
70
|
+
__param(2, inject(SrcFilesGenerator)),
|
|
71
|
+
__metadata("design:paramtypes", [Object, Object, SrcFilesGenerator])
|
|
77
72
|
], CreateProductClientMain);
|
|
78
73
|
export const CreateProductUCD = {
|
|
79
74
|
ext: {
|
|
@@ -23,13 +23,11 @@ import { SrcFilesGenerator } from '../lib/SrcFilesGenerator.js';
|
|
|
23
23
|
import { Manifest } from '../manifest.js';
|
|
24
24
|
let CreateTargetClientMain = class CreateTargetClientMain {
|
|
25
25
|
fsManager;
|
|
26
|
-
i18nManager;
|
|
27
26
|
logger;
|
|
28
27
|
srcFilesGenerator;
|
|
29
28
|
rootPath;
|
|
30
|
-
constructor(fsManager,
|
|
29
|
+
constructor(fsManager, logger, srcFilesGenerator) {
|
|
31
30
|
this.fsManager = fsManager;
|
|
32
|
-
this.i18nManager = i18nManager;
|
|
33
31
|
this.logger = logger;
|
|
34
32
|
this.srcFilesGenerator = srcFilesGenerator;
|
|
35
33
|
}
|
|
@@ -41,7 +39,7 @@ let CreateTargetClientMain = class CreateTargetClientMain {
|
|
|
41
39
|
// TODO : Rollback the whole thing in case of failure
|
|
42
40
|
const filesToGenerate = files(targetName);
|
|
43
41
|
if (filesToGenerate.size === 0) {
|
|
44
|
-
throw new IllegalArgumentError(
|
|
42
|
+
throw new IllegalArgumentError('err_target_generator_not_available');
|
|
45
43
|
}
|
|
46
44
|
await this.assertNotExisting();
|
|
47
45
|
await this.createRootDir();
|
|
@@ -55,9 +53,7 @@ let CreateTargetClientMain = class CreateTargetClientMain {
|
|
|
55
53
|
if (!(await this.fsManager.exists(this.rootPath))) {
|
|
56
54
|
return;
|
|
57
55
|
}
|
|
58
|
-
throw new IllegalArgumentError(
|
|
59
|
-
vars: { targetPath: this.rootPath },
|
|
60
|
-
}));
|
|
56
|
+
throw new IllegalArgumentError('err_existing_target');
|
|
61
57
|
}
|
|
62
58
|
async createRootDir() {
|
|
63
59
|
this.logger.info('Creating root dir : %s', this.rootPath);
|
|
@@ -70,10 +66,9 @@ let CreateTargetClientMain = class CreateTargetClientMain {
|
|
|
70
66
|
CreateTargetClientMain = __decorate([
|
|
71
67
|
injectable(),
|
|
72
68
|
__param(0, inject('FSManager')),
|
|
73
|
-
__param(1, inject('
|
|
74
|
-
__param(2, inject(
|
|
75
|
-
|
|
76
|
-
__metadata("design:paramtypes", [Object, Object, Object, SrcFilesGenerator])
|
|
69
|
+
__param(1, inject('Logger')),
|
|
70
|
+
__param(2, inject(SrcFilesGenerator)),
|
|
71
|
+
__metadata("design:paramtypes", [Object, Object, SrcFilesGenerator])
|
|
77
72
|
], CreateTargetClientMain);
|
|
78
73
|
export const CreateTargetUCD = {
|
|
79
74
|
ext: {
|
|
@@ -21,13 +21,11 @@ import { Manifest } from '../manifest.js';
|
|
|
21
21
|
let TestAppClientMain = class TestAppClientMain {
|
|
22
22
|
appTestSuiteRunner;
|
|
23
23
|
fsManager;
|
|
24
|
-
i18nManager;
|
|
25
24
|
logger;
|
|
26
25
|
simpleHTMLAppTestReportEmitter;
|
|
27
|
-
constructor(appTestSuiteRunner, fsManager,
|
|
26
|
+
constructor(appTestSuiteRunner, fsManager, logger, simpleHTMLAppTestReportEmitter) {
|
|
28
27
|
this.appTestSuiteRunner = appTestSuiteRunner;
|
|
29
28
|
this.fsManager = fsManager;
|
|
30
|
-
this.i18nManager = i18nManager;
|
|
31
29
|
this.logger = logger;
|
|
32
30
|
this.simpleHTMLAppTestReportEmitter = simpleHTMLAppTestReportEmitter;
|
|
33
31
|
}
|
|
@@ -39,7 +37,7 @@ let TestAppClientMain = class TestAppClientMain {
|
|
|
39
37
|
const updateSnapshots = uc.reqVal0('updateSnapshots');
|
|
40
38
|
const appPath = this.fsManager.path(appsPath, appName);
|
|
41
39
|
if (!(await this.fsManager.exists(appPath))) {
|
|
42
|
-
throw new IllegalArgumentError(
|
|
40
|
+
throw new IllegalArgumentError('err_unknown_app');
|
|
43
41
|
}
|
|
44
42
|
await this.appTestSuiteRunner.exec({
|
|
45
43
|
appPath,
|
|
@@ -68,10 +66,9 @@ TestAppClientMain = __decorate([
|
|
|
68
66
|
injectable(),
|
|
69
67
|
__param(0, inject('AppTestSuiteRunner')),
|
|
70
68
|
__param(1, inject('FSManager')),
|
|
71
|
-
__param(2, inject('
|
|
72
|
-
__param(3, inject(
|
|
73
|
-
|
|
74
|
-
__metadata("design:paramtypes", [Object, Object, Object, Object, SimpleHTMLAppTestReportEmitter])
|
|
69
|
+
__param(2, inject('Logger')),
|
|
70
|
+
__param(3, inject(SimpleHTMLAppTestReportEmitter)),
|
|
71
|
+
__metadata("design:paramtypes", [Object, Object, Object, SimpleHTMLAppTestReportEmitter])
|
|
75
72
|
], TestAppClientMain);
|
|
76
73
|
export const TestAppUCD = {
|
|
77
74
|
ext: {
|
package/dist/esm/convention.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export declare const UC_MAIN_SUFFIX: string;
|
|
|
48
48
|
export declare const UC_MAIN_CLIENT_SUFFIX: string;
|
|
49
49
|
export declare const UC_MAIN_SERVER_SUFFIX: string;
|
|
50
50
|
export declare const UC_MAIN_SERVER_FILE_NAME_SUFFIX: string;
|
|
51
|
-
export declare const UC_MAIN_STEP_PREFIX_REGULAR = "
|
|
51
|
+
export declare const UC_MAIN_STEP_PREFIX_REGULAR = "///";
|
|
52
52
|
export declare const UC_NAME_PLACEHOLDER: UCName;
|
|
53
53
|
export declare const UC_OPI_BASE: string;
|
|
54
54
|
export declare const UC_OPI_SUFFIX: string;
|
package/dist/esm/convention.js
CHANGED
|
@@ -59,7 +59,7 @@ export const UC_MAIN_SUFFIX = 'Main';
|
|
|
59
59
|
export const UC_MAIN_CLIENT_SUFFIX = `Client${UC_MAIN_SUFFIX}`;
|
|
60
60
|
export const UC_MAIN_SERVER_SUFFIX = `Server${UC_MAIN_SUFFIX}`;
|
|
61
61
|
export const UC_MAIN_SERVER_FILE_NAME_SUFFIX = `${UC_MAIN_SERVER_SUFFIX}.ts`;
|
|
62
|
-
export const UC_MAIN_STEP_PREFIX_REGULAR = '
|
|
62
|
+
export const UC_MAIN_STEP_PREFIX_REGULAR = '///';
|
|
63
63
|
export const UC_NAME_PLACEHOLDER = 'CreateX';
|
|
64
64
|
export const UC_OPI_BASE = 'UCOPIBase';
|
|
65
65
|
export const UC_OPI_SUFFIX = 'OPI';
|
|
@@ -16,6 +16,7 @@ import type { Email } from './final/TEmail.js';
|
|
|
16
16
|
import type { EmbeddedObject } from './final/TEmbeddedObject.js';
|
|
17
17
|
import type { Emoji } from './final/TEmoji.js';
|
|
18
18
|
import type { EncryptionKey } from './final/TEncryptionKey.js';
|
|
19
|
+
import type { ErrorCode } from './final/TErrorCode.js';
|
|
19
20
|
import type { ErrorMessage } from './final/TErrorMessage.js';
|
|
20
21
|
import type { ExternalServiceId } from './final/TExternalServiceId.js';
|
|
21
22
|
import type { File } from './final/TFile.js';
|
|
@@ -67,5 +68,5 @@ import type { UUID } from './final/TUUID.js';
|
|
|
67
68
|
import type { Year } from './final/TYear.js';
|
|
68
69
|
import type { YesNo } from './final/TYesNo.js';
|
|
69
70
|
type Primitive = string | number | boolean;
|
|
70
|
-
export type DataType = Primitive | Address | Amount | ApiKey | BarCode | CSS | Color | ColorRGBA | CompanyName | CountryISO3166Alpha2 | CurrencyISO4217 | DateISO8601 | DateTimeFormat | DirPath | DomainName | Email | EmbeddedObject | Emoji | EncryptionKey | ErrorMessage | ExternalServiceId | File | FileExtension | FileMimeType | FileName | FilePath | FreeTextLong | FreeTextShort | Geolocation | GitSSHURL | HTML | HTTPContentType | HTTPMethod | HTTPStatusNumber | HostAddress | HostPort | IPv4 | IPv6 | JSONString | JWT | JavaScript | JobTitle | Markdown | NumIndex | Password | Percentage | PersonFirstname | PersonFullname | PersonInitials | PersonLastname | QRCode | SQLQuery | SSHPrivateKey | SSHPublicKey | SearchQuery | SemVerVersion | ShellCommand | Slug | Time | Timestamp | TransportType | UIntDuration | UIntQuantity | URL | URLPath | UUID | Username | Year | YesNo;
|
|
71
|
+
export type DataType = Primitive | Address | Amount | ApiKey | BarCode | CSS | Color | ColorRGBA | CompanyName | CountryISO3166Alpha2 | CurrencyISO4217 | DateISO8601 | DateTimeFormat | DirPath | DomainName | Email | EmbeddedObject | Emoji | EncryptionKey | ErrorCode | ErrorMessage | ExternalServiceId | File | FileExtension | FileMimeType | FileName | FilePath | FreeTextLong | FreeTextShort | Geolocation | GitSSHURL | HTML | HTTPContentType | HTTPMethod | HTTPStatusNumber | HostAddress | HostPort | IPv4 | IPv6 | JSONString | JWT | JavaScript | JobTitle | Markdown | NumIndex | Password | Percentage | PersonFirstname | PersonFullname | PersonInitials | PersonLastname | QRCode | SQLQuery | SSHPrivateKey | SSHPublicKey | SearchQuery | SemVerVersion | ShellCommand | Slug | Time | Timestamp | TransportType | UIntDuration | UIntQuantity | URL | URLPath | UUID | Username | Year | YesNo;
|
|
71
72
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DataTypes: readonly ["Address", "Amount", "ApiKey", "BarCode", "CSS", "Color", "ColorRGBA", "CompanyName", "CountryISO3166Alpha2", "CurrencyISO4217", "DateISO8601", "DateTimeFormat", "DirPath", "DomainName", "Email", "EmbeddedObject", "Emoji", "EncryptionKey", "ErrorMessage", "ExternalServiceId", "File", "FileExtension", "FileMimeType", "FileName", "FilePath", "FreeTextLong", "FreeTextShort", "Geolocation", "GitSSHURL", "HTML", "HTTPContentType", "HTTPMethod", "HTTPStatusNumber", "HostAddress", "HostPort", "IPv4", "IPv6", "JSONString", "JWT", "JavaScript", "JobTitle", "Markdown", "NumIndex", "Password", "Percentage", "PersonFirstname", "PersonFullname", "PersonInitials", "PersonLastname", "QRCode", "SQLQuery", "SSHPrivateKey", "SSHPublicKey", "SearchQuery", "SemVerVersion", "ShellCommand", "Slug", "Time", "Timestamp", "TransportType", "UIntDuration", "UIntQuantity", "URL", "URLPath", "UUID", "Username", "Year", "YesNo"];
|
|
1
|
+
export declare const DataTypes: readonly ["Address", "Amount", "ApiKey", "BarCode", "CSS", "Color", "ColorRGBA", "CompanyName", "CountryISO3166Alpha2", "CurrencyISO4217", "DateISO8601", "DateTimeFormat", "DirPath", "DomainName", "Email", "EmbeddedObject", "Emoji", "EncryptionKey", "ErrorCode", "ErrorMessage", "ExternalServiceId", "File", "FileExtension", "FileMimeType", "FileName", "FilePath", "FreeTextLong", "FreeTextShort", "Geolocation", "GitSSHURL", "HTML", "HTTPContentType", "HTTPMethod", "HTTPStatusNumber", "HostAddress", "HostPort", "IPv4", "IPv6", "JSONString", "JWT", "JavaScript", "JobTitle", "Markdown", "NumIndex", "Password", "Percentage", "PersonFirstname", "PersonFullname", "PersonInitials", "PersonLastname", "QRCode", "SQLQuery", "SSHPrivateKey", "SSHPublicKey", "SearchQuery", "SemVerVersion", "ShellCommand", "Slug", "Time", "Timestamp", "TransportType", "UIntDuration", "UIntQuantity", "URL", "URLPath", "UUID", "Username", "Year", "YesNo"];
|
package/dist/esm/dt/DataTypes.js
CHANGED
package/dist/esm/dt/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export { type Email, TEmail } from './final/TEmail.js';
|
|
|
25
25
|
export { type EmbeddedObject, TEmbeddedObject, } from './final/TEmbeddedObject.js';
|
|
26
26
|
export { type Emoji, TEmoji } from './final/TEmoji.js';
|
|
27
27
|
export { type EncryptionKey, TEncryptionKey } from './final/TEncryptionKey.js';
|
|
28
|
+
export { type ErrorCode, TErrorCode } from './final/TErrorCode.js';
|
|
28
29
|
export { type ErrorMessage, TErrorMessage } from './final/TErrorMessage.js';
|
|
29
30
|
export { type ExternalServiceId, TExternalServiceId, } from './final/TExternalServiceId.js';
|
|
30
31
|
export { type File, TFile, type TFileConstraints } from './final/TFile.js';
|
package/dist/esm/dt/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export { TEmail } from './final/TEmail.js';
|
|
|
24
24
|
export { TEmbeddedObject, } from './final/TEmbeddedObject.js';
|
|
25
25
|
export { TEmoji } from './final/TEmoji.js';
|
|
26
26
|
export { TEncryptionKey } from './final/TEncryptionKey.js';
|
|
27
|
+
export { TErrorCode } from './final/TErrorCode.js';
|
|
27
28
|
export { TErrorMessage } from './final/TErrorMessage.js';
|
|
28
29
|
export { TExternalServiceId, } from './final/TExternalServiceId.js';
|
|
29
30
|
export { TFile } from './final/TFile.js';
|
|
@@ -3,7 +3,7 @@ export interface ServerError {
|
|
|
3
3
|
message: ErrorMessage;
|
|
4
4
|
}
|
|
5
5
|
export declare abstract class CustomError extends Error {
|
|
6
|
-
static readonly
|
|
6
|
+
static readonly UNEXPECTED: ErrorMessage;
|
|
7
7
|
abstract httpStatus: HTTPStatusNumber;
|
|
8
8
|
constructor(message?: ErrorMessage);
|
|
9
9
|
toObj(): ServerError;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class CustomError extends Error {
|
|
2
|
-
static
|
|
2
|
+
static UNEXPECTED = 'err_unexpected';
|
|
3
3
|
constructor(message) {
|
|
4
|
-
super(message ?? CustomError.
|
|
4
|
+
super(message ?? CustomError.UNEXPECTED);
|
|
5
5
|
this.name = 'CustomError';
|
|
6
6
|
Object.setPrototypeOf(this, CustomError.prototype);
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { CustomError } from './CustomError.js';
|
|
|
2
2
|
export class ForbiddenAsNotFoundError extends CustomError {
|
|
3
3
|
httpStatus = 404;
|
|
4
4
|
constructor(message) {
|
|
5
|
-
super(message ?? '
|
|
5
|
+
super(message ?? 'err_not_found');
|
|
6
6
|
this.name = 'ForbiddenAsNotFoundError';
|
|
7
7
|
Object.setPrototypeOf(this, ForbiddenAsNotFoundError.prototype);
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import { CustomError } from './CustomError.js';
|
|
|
2
2
|
export class ForbiddenError extends CustomError {
|
|
3
3
|
httpStatus = 403;
|
|
4
4
|
constructor(message) {
|
|
5
|
-
super(message ?? '
|
|
5
|
+
super(message ?? 'err_forbidden');
|
|
6
6
|
this.name = 'ForbiddenError';
|
|
7
7
|
Object.setPrototypeOf(this, ForbiddenError.prototype);
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CustomError } from './CustomError.js';
|
|
2
2
|
export class IllegalArgumentError extends CustomError {
|
|
3
|
-
httpStatus = 400;
|
|
3
|
+
httpStatus = 400; // 422 instead ?
|
|
4
4
|
constructor(message) {
|
|
5
|
-
super(message ?? '
|
|
5
|
+
super(message ?? 'err_illegal_argument');
|
|
6
6
|
this.name = 'IllegalArgumentError';
|
|
7
7
|
Object.setPrototypeOf(this, IllegalArgumentError.prototype);
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import { CustomError } from './CustomError.js';
|
|
|
2
2
|
export class InternalServerError extends CustomError {
|
|
3
3
|
httpStatus = 500;
|
|
4
4
|
constructor(message) {
|
|
5
|
-
super(message
|
|
5
|
+
super(message);
|
|
6
6
|
this.name = 'InternalServerError';
|
|
7
7
|
Object.setPrototypeOf(this, InternalServerError.prototype);
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import { CustomError } from './CustomError.js';
|
|
|
2
2
|
export class NotFoundError extends CustomError {
|
|
3
3
|
httpStatus = 404;
|
|
4
4
|
constructor(message) {
|
|
5
|
-
super(message ?? '
|
|
5
|
+
super(message ?? 'err_not_found');
|
|
6
6
|
this.name = 'NotFoundError';
|
|
7
7
|
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import { CustomError } from './CustomError.js';
|
|
|
2
2
|
export class UnauthorizedError extends CustomError {
|
|
3
3
|
httpStatus = 401;
|
|
4
4
|
constructor(message) {
|
|
5
|
-
super(message ?? '
|
|
5
|
+
super(message ?? 'err_unauthorized');
|
|
6
6
|
this.name = 'UnauthorizedError';
|
|
7
7
|
Object.setPrototypeOf(this, UnauthorizedError.prototype);
|
|
8
8
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CustomError } from './CustomError.js';
|
|
2
|
+
export class UnavailableError extends CustomError {
|
|
3
|
+
httpStatus = 503;
|
|
4
|
+
constructor(message) {
|
|
5
|
+
super(message ?? 'err_unavailable');
|
|
6
|
+
this.name = 'UnavailableError';
|
|
7
|
+
Object.setPrototypeOf(this, UnavailableError.prototype);
|
|
8
|
+
}
|
|
9
|
+
}
|
package/dist/esm/error/funcs.js
CHANGED
|
@@ -3,12 +3,14 @@ import { IllegalArgumentError } from './IllegalArgumentError.js';
|
|
|
3
3
|
import { InternalServerError } from './InternalServerError.js';
|
|
4
4
|
import { NotFoundError } from './NotFoundError.js';
|
|
5
5
|
import { UnauthorizedError } from './UnauthorizedError.js';
|
|
6
|
+
import { UnavailableError } from './UnavailableError.js';
|
|
6
7
|
const ERROR_HTTP_STATUS_MAP = new Map([
|
|
7
8
|
[400, IllegalArgumentError],
|
|
8
9
|
[401, UnauthorizedError],
|
|
9
10
|
[403, ForbiddenError],
|
|
10
11
|
[404, NotFoundError],
|
|
11
12
|
[500, InternalServerError],
|
|
13
|
+
[503, UnavailableError],
|
|
12
14
|
]);
|
|
13
15
|
export function isEmptyJSON(err) {
|
|
14
16
|
return (err instanceof Error &&
|
|
@@ -9,3 +9,4 @@ export { NotCallableError, type NotCallableErrorReason, } from './internal/NotCa
|
|
|
9
9
|
export { NotImplementedError } from './internal/NotImplementedError.js';
|
|
10
10
|
export { NotFoundError } from './NotFoundError.js';
|
|
11
11
|
export { UnauthorizedError } from './UnauthorizedError.js';
|
|
12
|
+
export { UnavailableError } from './UnavailableError.js';
|
package/dist/esm/error/index.js
CHANGED
|
@@ -9,3 +9,4 @@ export { NotCallableError, } from './internal/NotCallableError.js';
|
|
|
9
9
|
export { NotImplementedError } from './internal/NotImplementedError.js';
|
|
10
10
|
export { NotFoundError } from './NotFoundError.js';
|
|
11
11
|
export { UnauthorizedError } from './UnauthorizedError.js';
|
|
12
|
+
export { UnavailableError } from './UnavailableError.js';
|
|
@@ -9,6 +9,14 @@ export const I18nDE = {
|
|
|
9
9
|
dt_YesNo_N_label: 'Nein',
|
|
10
10
|
dt_YesNo_Y_desc: '',
|
|
11
11
|
dt_YesNo_Y_label: 'Ja',
|
|
12
|
+
err_forbidden: 'Verboten',
|
|
13
|
+
err_illegal_argument: 'Ungültig',
|
|
14
|
+
err_not_found: 'Nicht gefunden',
|
|
15
|
+
err_uc_data_store_not_readable: 'Die Daten sind nicht lesbar',
|
|
16
|
+
err_uc_data_store_not_writable: 'Die Daten sind nicht beschreibbar',
|
|
17
|
+
err_unauthorized: 'Nicht autorisiert',
|
|
18
|
+
err_unavailable: 'Nicht verfügbar',
|
|
19
|
+
err_unexpected: 'Unerwarteter Fehler',
|
|
12
20
|
uc_client_confirm_cancel: 'Abbrechen',
|
|
13
21
|
uc_client_confirm_confirm: 'Ja',
|
|
14
22
|
uc_client_confirm_message: '',
|
|
@@ -9,6 +9,14 @@ export const I18nEN = {
|
|
|
9
9
|
dt_YesNo_N_label: 'No',
|
|
10
10
|
dt_YesNo_Y_desc: '',
|
|
11
11
|
dt_YesNo_Y_label: 'Yes',
|
|
12
|
+
err_forbidden: 'Forbidden',
|
|
13
|
+
err_illegal_argument: 'Invalid',
|
|
14
|
+
err_not_found: 'Not found',
|
|
15
|
+
err_uc_data_store_not_readable: 'Data is not readable',
|
|
16
|
+
err_uc_data_store_not_writable: 'Data is not writable',
|
|
17
|
+
err_unauthorized: 'Unauthorized',
|
|
18
|
+
err_unavailable: 'Unavailable',
|
|
19
|
+
err_unexpected: 'Unexpected error',
|
|
12
20
|
uc_client_confirm_cancel: 'Cancel',
|
|
13
21
|
uc_client_confirm_confirm: 'Yes',
|
|
14
22
|
uc_client_confirm_message: '',
|
|
@@ -9,6 +9,14 @@ export const I18nES = {
|
|
|
9
9
|
dt_YesNo_N_label: 'No',
|
|
10
10
|
dt_YesNo_Y_desc: '',
|
|
11
11
|
dt_YesNo_Y_label: 'Sí',
|
|
12
|
+
err_forbidden: 'Prohibido',
|
|
13
|
+
err_illegal_argument: 'Inválido',
|
|
14
|
+
err_not_found: 'No encontrado',
|
|
15
|
+
err_uc_data_store_not_readable: 'Los datos no son legibles',
|
|
16
|
+
err_uc_data_store_not_writable: 'Los datos no son escribibles',
|
|
17
|
+
err_unauthorized: 'No autorizado',
|
|
18
|
+
err_unavailable: 'No disponible',
|
|
19
|
+
err_unexpected: 'Error inesperado',
|
|
12
20
|
uc_client_confirm_cancel: 'Cancelar',
|
|
13
21
|
uc_client_confirm_confirm: 'Sí',
|
|
14
22
|
uc_client_confirm_message: '',
|
|
@@ -9,6 +9,14 @@ export const I18nFR = {
|
|
|
9
9
|
dt_YesNo_N_label: 'Non',
|
|
10
10
|
dt_YesNo_Y_desc: '',
|
|
11
11
|
dt_YesNo_Y_label: 'Oui',
|
|
12
|
+
err_forbidden: 'Interdit',
|
|
13
|
+
err_illegal_argument: 'Invalide',
|
|
14
|
+
err_not_found: 'Introuvable',
|
|
15
|
+
err_uc_data_store_not_readable: 'Les données ne sont pas lisibles',
|
|
16
|
+
err_uc_data_store_not_writable: 'Les données ne sont pas écrivables',
|
|
17
|
+
err_unauthorized: 'Non autorisé',
|
|
18
|
+
err_unavailable: 'Non disponible',
|
|
19
|
+
err_unexpected: 'Erreur inattendue',
|
|
12
20
|
uc_client_confirm_cancel: 'Annuler',
|
|
13
21
|
uc_client_confirm_confirm: 'Oui',
|
|
14
22
|
uc_client_confirm_message: '',
|
package/dist/esm/i18n/types.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type I18nLanguageCode = 'de' | 'en' | 'es' | 'fr';
|
|
|
8
8
|
*/
|
|
9
9
|
export type I18nTranslation = string;
|
|
10
10
|
export type I18nTranslationKey = string;
|
|
11
|
-
export type I18nCoreKey = ViolationI18nable | `dt_FreeTextShort_constr_${keyof TStringConstraints}` | `dt_File_constr_${keyof TFileConstraints}` | `dt_YesNo_${YesNo}_${keyof UCWording}` | `uc_client_confirm_${keyof UCClientConfirmConfig}` | `uc_i_submit_${UCExecState}`;
|
|
11
|
+
export type I18nCoreKey = ViolationI18nable | `dt_FreeTextShort_constr_${keyof TStringConstraints}` | `dt_File_constr_${keyof TFileConstraints}` | `dt_YesNo_${YesNo}_${keyof UCWording}` | 'err_forbidden' | 'err_illegal_argument' | 'err_not_found' | 'err_uc_data_store_not_readable' | 'err_uc_data_store_not_writable' | 'err_unauthorized' | 'err_unavailable' | 'err_unexpected' | `uc_client_confirm_${keyof UCClientConfirmConfig}` | `uc_i_submit_${UCExecState}`;
|
|
12
12
|
export type I18nCoreTranslations = Record<I18nCoreKey, I18nTranslation>;
|
|
13
13
|
export type I18nSource = any;
|
|
14
14
|
export type I18nSourceSafe = {
|
|
@@ -37,6 +37,12 @@ export declare const I18n: {
|
|
|
37
37
|
ucif_serverPortRangeStart_desc: string;
|
|
38
38
|
ucif_skipCoverage_desc: string;
|
|
39
39
|
ucif_updateSnapshots_desc: string;
|
|
40
|
+
err_unexpected: string;
|
|
41
|
+
err_not_found: string;
|
|
42
|
+
err_forbidden: string;
|
|
43
|
+
err_illegal_argument: string;
|
|
44
|
+
err_unauthorized: string;
|
|
45
|
+
err_unavailable: string;
|
|
40
46
|
validation_max: string;
|
|
41
47
|
validation_min: string;
|
|
42
48
|
validation_fieldsOr: string;
|
|
@@ -79,6 +85,8 @@ export declare const I18n: {
|
|
|
79
85
|
validation_type_array: string;
|
|
80
86
|
validation_type_int: string;
|
|
81
87
|
validation_type_scalar: string;
|
|
88
|
+
err_uc_data_store_not_readable: string;
|
|
89
|
+
err_uc_data_store_not_writable: string;
|
|
82
90
|
dt_FreeTextShort_constr_format: string;
|
|
83
91
|
dt_FreeTextShort_constr_maxLength: string;
|
|
84
92
|
dt_FreeTextShort_constr_minLength: string;
|
|
@@ -33,7 +33,7 @@ let SimpleHTTPAPICaller = class SimpleHTTPAPICaller {
|
|
|
33
33
|
this.sseStreamManager = sseStreamManager;
|
|
34
34
|
this.xmlManager = xmlManager;
|
|
35
35
|
}
|
|
36
|
-
async exec({ additionalHeadersBuilder, authorizationHeader, basicAuth, contentType = 'application/json', errBuilder, method, opts, outputBuilder, registerAbort, req, stream, urlBuilder, unknownErrorMessage = CustomError.
|
|
36
|
+
async exec({ additionalHeadersBuilder, authorizationHeader, basicAuth, contentType = 'application/json', errBuilder, method, opts, outputBuilder, registerAbort, req, stream, urlBuilder, unknownErrorMessage = CustomError.UNEXPECTED, }) {
|
|
37
37
|
const baseURL = await urlBuilder();
|
|
38
38
|
const data = (await req?.builder?.()) || {};
|
|
39
39
|
const { body, url } = await this.httpRequestBuilder.exec({
|
|
@@ -56,7 +56,7 @@ let CommandExecutor = class CommandExecutor {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
catch (err) {
|
|
59
|
-
printError(err);
|
|
59
|
+
printError(this.i18nManager, err);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
fieldsForFlags(uc) {
|
|
@@ -107,7 +107,7 @@ let CommandExecutor = class CommandExecutor {
|
|
|
107
107
|
const message = this.i18nManager.t(key, {
|
|
108
108
|
vars: { expected },
|
|
109
109
|
});
|
|
110
|
-
printError(message);
|
|
110
|
+
printError(this.i18nManager, message);
|
|
111
111
|
return false;
|
|
112
112
|
},
|
|
113
113
|
});
|