libmodulor 0.27.0 → 0.29.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 +39 -0
- package/README.md +2 -2
- package/dist/esm/apps/Helper/src/i18n.js +4 -4
- package/dist/esm/apps/Helper/src/lib/layers/project.js +6 -6
- 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/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/base/TBase.d.ts +2 -0
- package/dist/esm/dt/base/TBase.js +5 -0
- package/dist/esm/dt/base/TBoolean.d.ts +2 -0
- package/dist/esm/dt/base/TBoolean.js +3 -0
- package/dist/esm/dt/base/TInt.d.ts +2 -0
- package/dist/esm/dt/base/TInt.js +3 -0
- package/dist/esm/dt/base/TNumber.d.ts +2 -0
- package/dist/esm/dt/base/TNumber.js +3 -0
- package/dist/esm/dt/base/TObject.d.ts +2 -0
- package/dist/esm/dt/base/TObject.js +29 -0
- package/dist/esm/dt/final/TApiKey.d.ts +2 -0
- package/dist/esm/dt/final/TApiKey.js +3 -0
- package/dist/esm/dt/final/TDateISO8601.d.ts +2 -0
- package/dist/esm/dt/final/TDateISO8601.js +3 -0
- package/dist/esm/dt/final/TDomainName.d.ts +2 -0
- package/dist/esm/dt/final/TDomainName.js +3 -0
- package/dist/esm/dt/final/TEmail.d.ts +2 -0
- package/dist/esm/dt/final/TEmail.js +3 -0
- package/dist/esm/dt/final/TEncryptionKey.d.ts +2 -0
- package/dist/esm/dt/final/TEncryptionKey.js +3 -0
- package/dist/esm/dt/final/TErrorCode.d.ts +7 -0
- package/dist/esm/dt/final/TErrorCode.js +9 -0
- package/dist/esm/dt/final/TFile.d.ts +2 -0
- package/dist/esm/dt/final/TFile.js +3 -0
- package/dist/esm/dt/final/TIPv4.d.ts +2 -0
- package/dist/esm/dt/final/TIPv4.js +3 -0
- package/dist/esm/dt/final/TIPv6.d.ts +2 -0
- package/dist/esm/dt/final/TIPv6.js +3 -0
- package/dist/esm/dt/final/TJWT.d.ts +2 -0
- package/dist/esm/dt/final/TJWT.js +3 -0
- package/dist/esm/dt/final/TPassword.d.ts +2 -0
- package/dist/esm/dt/final/TPassword.js +3 -0
- package/dist/esm/dt/final/TSSHPrivateKey.d.ts +2 -0
- package/dist/esm/dt/final/TSSHPrivateKey.js +3 -0
- package/dist/esm/dt/final/TTime.d.ts +2 -0
- package/dist/esm/dt/final/TTime.js +3 -0
- package/dist/esm/dt/final/TURL.d.ts +2 -0
- package/dist/esm/dt/final/TURL.js +3 -0
- package/dist/esm/dt/index.d.ts +2 -0
- package/dist/esm/dt/index.js +1 -0
- package/dist/esm/dt/targets/json-schema.d.ts +24 -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.d.ts +3 -0
- package/dist/esm/error/funcs.js +3 -1
- package/dist/esm/error/index.d.ts +2 -1
- package/dist/esm/error/index.js +2 -1
- 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/product/manifest.d.ts +2 -0
- package/dist/esm/products/Helper/i18n.d.ts +8 -0
- package/dist/esm/std/impl/SimpleHTTPAPICaller.js +1 -1
- package/dist/esm/std/impl/SimpleMapI18nManager.d.ts +1 -1
- package/dist/esm/std/impl/SimpleMapI18nManager.js +4 -2
- package/dist/esm/target/edge-worker-hono-server/SyncEdgeWorkerHonoServerManager.d.ts +6 -2
- package/dist/esm/target/edge-worker-hono-server/SyncEdgeWorkerHonoServerManager.js +17 -9
- package/dist/esm/target/index.d.ts +1 -0
- 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/openapi/OpenAPISpecBuilder.d.ts +25 -0
- package/dist/esm/target/lib/openapi/OpenAPISpecBuilder.js +131 -0
- package/dist/esm/target/lib/openapi/consts.d.ts +2 -0
- package/dist/esm/target/lib/openapi/consts.js +1 -0
- package/dist/esm/target/lib/openapi/funcs.d.ts +16 -0
- package/dist/esm/target/lib/openapi/funcs.js +249 -0
- package/dist/esm/target/lib/openapi/input.d.ts +16 -0
- package/dist/esm/target/lib/openapi/input.js +33 -0
- package/dist/esm/target/lib/openapi/types.d.ts +109 -0
- package/dist/esm/target/lib/rn/input.d.ts +3 -0
- package/dist/esm/target/lib/server/AuthCookieCreator.d.ts +2 -1
- 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/lib/server/ServerBooter.d.ts +4 -2
- package/dist/esm/target/lib/server/ServerBooter.js +34 -11
- package/dist/esm/target/lib/server/ServerManager.d.ts +19 -9
- package/dist/esm/target/lib/server/ServerRequestHandler.d.ts +0 -1
- package/dist/esm/target/lib/server/ServerRequestHandler.js +2 -2
- package/dist/esm/target/lib/server/consts.d.ts +4 -0
- package/dist/esm/target/lib/server/consts.js +22 -0
- package/dist/esm/target/lib/server-express/CORSMiddlewareBuilder.d.ts +15 -0
- package/dist/esm/target/lib/server-express/CORSMiddlewareBuilder.js +55 -0
- package/dist/esm/target/lib/server-express/funcs.d.ts +2 -1
- package/dist/esm/target/lib/server-express/funcs.js +7 -2
- package/dist/esm/target/lib/server-hono/CORSMiddlewareBuilder.d.ts +14 -0
- package/dist/esm/target/{node-express-server/middlewares/PublicApiKeyCheckerMiddlewareBuilder.js → lib/server-hono/CORSMiddlewareBuilder.js} +22 -20
- package/dist/esm/target/lib/server-hono/funcs.d.ts +2 -1
- package/dist/esm/target/lib/server-hono/funcs.js +2 -1
- package/dist/esm/target/lib/shared.d.ts +4 -0
- package/dist/esm/target/lib/shared.js +2 -1
- package/dist/esm/target/nextjs-server/NextJSServerManager.d.ts +3 -1
- package/dist/esm/target/nextjs-server/NextJSServerManager.js +3 -0
- package/dist/esm/target/node-core-cli/NodeCoreCLIManager.js +1 -1
- package/dist/esm/target/node-express-server/NodeExpressServerManager.d.ts +7 -3
- package/dist/esm/target/node-express-server/NodeExpressServerManager.js +24 -14
- package/dist/esm/target/node-hono-server/NodeHonoServerManager.d.ts +6 -2
- package/dist/esm/target/node-hono-server/NodeHonoServerManager.js +21 -11
- package/dist/esm/target/node-mcp-server/NodeLocalStdioMCPServerManager.d.ts +3 -1
- package/dist/esm/target/node-mcp-server/NodeLocalStdioMCPServerManager.js +19 -14
- package/dist/esm/target/node-mcp-server/types.d.ts +0 -4
- 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/UC.d.ts +2 -0
- package/dist/esm/uc/UC.js +16 -1
- 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/metadata.d.ts +7 -0
- package/dist/esm/uc/metadata.js +10 -0
- package/dist/esm/uc/output-field.d.ts +1 -0
- package/dist/esm/uc/output-field.js +13 -1
- package/dist/esm/uc/settings/consts.js +1 -0
- package/dist/esm/uc/settings.d.ts +8 -1
- package/dist/esm/uc/utils/ucHTTPContract.js +1 -1
- package/dist/esm/uc/workers/UCExecChecker.d.ts +3 -3
- package/dist/esm/uc/workers/UCExecChecker.js +5 -5
- package/dist/esm/utils/http/types.d.ts +5 -0
- package/dist/esm/utils/index.d.ts +2 -2
- 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.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.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/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/dist/esm/{products/Helper/cli-node-core/index.d.ts → dt/targets/json-schema.js} +0 -0
- /package/dist/esm/{products/Helper/index.d.ts → target/lib/openapi/types.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v0.29.0 (2026-05-10)
|
|
4
|
+
|
|
5
|
+
Report an error when the `onClose` handler of SSE has been missed only when it has streamed once.
|
|
6
|
+
|
|
7
|
+
Introduce the automatic generation of [OpenAPI](https://www.openapis.org) specs for server targets.
|
|
8
|
+
It is disabled by default.
|
|
9
|
+
To opt-in, simply open the server's `settings.ts` and set `server_expose_openapi_spec: true`.
|
|
10
|
+
When the server starts, the spec is generated on the fly and made available at `/api/openapi.json`.
|
|
11
|
+
This path is customizable by setting `server_expose_openapi_spec_at`.
|
|
12
|
+
See it in action in the [Playground](https://libmodulor.c100k.eu/docs/examples/Playground).
|
|
13
|
+
|
|
14
|
+
Introduce [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS) settings for server targets.
|
|
15
|
+
It is disabled by default.
|
|
16
|
+
Settings available : `server_cors_credentials`, `server_cors_headers`, `server_cors_methods`, `server_cors_origins`.
|
|
17
|
+
|
|
18
|
+
See all the changes here : https://github.com/c100k/libmodulor/compare/v0.28.0...master
|
|
19
|
+
|
|
20
|
+
## v0.28.0 (2026-05-01)
|
|
21
|
+
|
|
22
|
+
Replace `Provider` by `Factory` in Dependency Injection (`inversify`). If you're using `bindProvider`, simply replace it by `bindFactory`.
|
|
23
|
+
|
|
24
|
+
Allow '...' at the end of a uc label. Although a label ending with '.' is odd, one ending with '...' is not (e.g. "Connect...").
|
|
25
|
+
|
|
26
|
+
Introduce `UCDataStoreMode` setting. It allows to to set it to `READ_WRITE` (default), `READ`, `WRITE` or `NONE`.
|
|
27
|
+
For instance, it's very useful to set it to `READ` when planning a migration with different DB engines.
|
|
28
|
+
In addition to that, `NONE` is convenient to prevent all reads and writes when there is an issue.
|
|
29
|
+
In these cases, the users receive a clear and proper error.
|
|
30
|
+
|
|
31
|
+
Fix an issue where the form would reset even when not success on the react target.
|
|
32
|
+
|
|
33
|
+
Bumped `typescript` to 6.0.x.
|
|
34
|
+
|
|
35
|
+
**BREAKING** : Handle errors i18n client side.
|
|
36
|
+
From now on, the server returns error codes (e.g. `err_forbidden` instead of `Forbidden`) and all translations must happen client side.
|
|
37
|
+
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')`.
|
|
38
|
+
It's now up to the client to translate according to the current locale.
|
|
39
|
+
|
|
40
|
+
See all the changes here : https://github.com/c100k/libmodulor/compare/v0.27.0...master
|
|
41
|
+
|
|
3
42
|
## v0.27.0 (2026-02-09)
|
|
4
43
|
|
|
5
44
|
**Highlights**
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Here is how to easily create all of them, in a brand new project :
|
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
23
|
# Create a project
|
|
24
|
-
|
|
24
|
+
pnpx libmodulor CreateProject --projectName my-super-project
|
|
25
25
|
cd my-super-project
|
|
26
26
|
|
|
27
27
|
# Create an app
|
|
@@ -50,4 +50,4 @@ If you think you can help in any way, feel free to contact me (cf. `author` in `
|
|
|
50
50
|
|
|
51
51
|
## ⚖️ License
|
|
52
52
|
|
|
53
|
-
[LGPL-3.0](https://github.com/c100k/libmodulor/blob/v0.
|
|
53
|
+
[LGPL-3.0](https://github.com/c100k/libmodulor/blob/v0.29.0/LICENSE)
|
|
@@ -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)',
|
|
@@ -87,18 +87,18 @@ export const PACKAGE_JSON = (name) => `{
|
|
|
87
87
|
"reflect-metadata": "^0.2.2"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@biomejs/biome": "^2.
|
|
91
|
-
"@types/node": "^25.2
|
|
90
|
+
"@biomejs/biome": "^2.4.14",
|
|
91
|
+
"@types/node": "^25.6.2",
|
|
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.3",
|
|
100
|
+
"typescript": "^6.0.3",
|
|
101
|
+
"vite": "^6.4.2",
|
|
102
102
|
"vitest": "^3.2.4"
|
|
103
103
|
}
|
|
104
104
|
}
|
|
@@ -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: {
|
|
@@ -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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IconCode } from '../../icon/index.js';
|
|
2
2
|
import type { DataType } from '../DataType.js';
|
|
3
3
|
import type { Color } from '../final/TColor.js';
|
|
4
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
4
5
|
import type { RNInputMode } from '../targets/rn.js';
|
|
5
6
|
import type { HTMLInputType } from '../targets/web.js';
|
|
6
7
|
import { Validation } from '../Validation.js';
|
|
@@ -54,6 +55,7 @@ export declare abstract class TBase<T extends DataType> {
|
|
|
54
55
|
hasStrictOptions(): boolean;
|
|
55
56
|
htmlInputType(): HTMLInputType;
|
|
56
57
|
isSensitive(): boolean;
|
|
58
|
+
jsonSchemaType(): JSONSchemaType;
|
|
57
59
|
rnInputMode(): RNInputMode;
|
|
58
60
|
setDefaultValue(defaultValue: T): this;
|
|
59
61
|
setExamples(examples: T[]): this;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
1
2
|
import type { HTMLInputType } from '../targets/web.js';
|
|
2
3
|
import type { Validation } from '../Validation.js';
|
|
3
4
|
import { TBase, type TName } from './TBase.js';
|
|
@@ -7,5 +8,6 @@ export declare class TBoolean extends TBase<boolean> {
|
|
|
7
8
|
example(): boolean;
|
|
8
9
|
fmt(ifNullOrUndefined?: string | undefined): string;
|
|
9
10
|
htmlInputType(): HTMLInputType;
|
|
11
|
+
jsonSchemaType(): JSONSchemaType;
|
|
10
12
|
validate(): Validation;
|
|
11
13
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Unit } from '../../utils/index.js';
|
|
2
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
2
3
|
import type { RNInputMode } from '../targets/rn.js';
|
|
3
4
|
import type { Validation } from '../Validation.js';
|
|
4
5
|
import type { TName } from './TBase.js';
|
|
@@ -13,6 +14,7 @@ export declare class TInt<T extends Int = Int> extends TNumber<T> {
|
|
|
13
14
|
assign(raw: unknown): this;
|
|
14
15
|
example(): T;
|
|
15
16
|
getConstraints(): TIntConstraints | undefined;
|
|
17
|
+
jsonSchemaType(): JSONSchemaType;
|
|
16
18
|
max(): NonNullable<TIntConstraints['max']>;
|
|
17
19
|
min(): NonNullable<TIntConstraints['min']>;
|
|
18
20
|
rnInputMode(): RNInputMode;
|
package/dist/esm/dt/base/TInt.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Unit } from '../../utils/index.js';
|
|
2
2
|
import type { UIntQuantity } from '../final/TUIntQuantity.js';
|
|
3
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
3
4
|
import type { RNInputMode } from '../targets/rn.js';
|
|
4
5
|
import type { HTMLInputType } from '../targets/web.js';
|
|
5
6
|
import type { Validation } from '../Validation.js';
|
|
@@ -24,6 +25,7 @@ export declare class TNumber<T extends number = number> extends TBase<T> {
|
|
|
24
25
|
getDecimalsCount(): UIntQuantity | undefined;
|
|
25
26
|
getStep(): T | undefined;
|
|
26
27
|
htmlInputType(): HTMLInputType;
|
|
28
|
+
jsonSchemaType(): JSONSchemaType;
|
|
27
29
|
max(): NonNullable<TNumberConstraints<number>['max']>;
|
|
28
30
|
min(): NonNullable<TNumberConstraints<number>['min']>;
|
|
29
31
|
rnInputMode(): RNInputMode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EnumOf } from '../../utils/index.js';
|
|
2
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
2
3
|
import type { Validation } from '../Validation.js';
|
|
3
4
|
import { TBase, type TName } from './TBase.js';
|
|
4
5
|
export declare const TObjectShapeValidationStrategy: {
|
|
@@ -30,6 +31,7 @@ export declare class TObject<T extends object> extends TBase<T> {
|
|
|
30
31
|
tName(): TName;
|
|
31
32
|
example(): T;
|
|
32
33
|
fmt(ifNullOrUndefined?: string | undefined): string;
|
|
34
|
+
jsonSchemaType(): JSONSchemaType;
|
|
33
35
|
validate(): Validation;
|
|
34
36
|
private valueAndExampleHaveSameKeys;
|
|
35
37
|
}
|
|
@@ -36,6 +36,35 @@ export class TObject extends TBase {
|
|
|
36
36
|
}
|
|
37
37
|
return JSON.stringify(this.raw);
|
|
38
38
|
}
|
|
39
|
+
jsonSchemaType() {
|
|
40
|
+
const example = this.example();
|
|
41
|
+
const properties = Object.entries(example).reduce((acc, [k, v]) => {
|
|
42
|
+
const typeofv = typeof v;
|
|
43
|
+
// TODO : Make this work recursively
|
|
44
|
+
switch (typeofv) {
|
|
45
|
+
case 'boolean':
|
|
46
|
+
acc[k] = { type: 'boolean' };
|
|
47
|
+
break;
|
|
48
|
+
case 'bigint':
|
|
49
|
+
case 'number':
|
|
50
|
+
acc[k] = { type: 'number' };
|
|
51
|
+
break;
|
|
52
|
+
case 'function':
|
|
53
|
+
case 'object':
|
|
54
|
+
case 'symbol':
|
|
55
|
+
case 'undefined':
|
|
56
|
+
acc[k] = { type: 'object' };
|
|
57
|
+
break;
|
|
58
|
+
case 'string':
|
|
59
|
+
acc[k] = { type: 'string' };
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
typeofv;
|
|
63
|
+
}
|
|
64
|
+
return acc;
|
|
65
|
+
}, {});
|
|
66
|
+
return { properties, type: 'object' };
|
|
67
|
+
}
|
|
39
68
|
validate() {
|
|
40
69
|
const validation = super.validate();
|
|
41
70
|
if (!validation.isOK()) {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { TName } from '../base/TBase.js';
|
|
2
2
|
import { TString } from '../base/TString.js';
|
|
3
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
3
4
|
import type { HTMLInputType } from '../targets/web.js';
|
|
4
5
|
export type ApiKey = string;
|
|
5
6
|
export declare class TApiKey extends TString<ApiKey> {
|
|
6
7
|
tName(): TName;
|
|
7
8
|
example(): ApiKey;
|
|
8
9
|
htmlInputType(): HTMLInputType;
|
|
10
|
+
jsonSchemaType(): JSONSchemaType;
|
|
9
11
|
isSensitive(): boolean;
|
|
10
12
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TName } from '../base/TBase.js';
|
|
2
2
|
import { TString } from '../base/TString.js';
|
|
3
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
3
4
|
import type { HTMLInputType } from '../targets/web.js';
|
|
4
5
|
import type { Validation } from '../Validation.js';
|
|
5
6
|
export type DateISO8601 = string;
|
|
@@ -8,5 +9,6 @@ export declare class TDateISO8601 extends TString<DateISO8601> {
|
|
|
8
9
|
example(): DateISO8601;
|
|
9
10
|
fmt(ifNullOrUndefined?: string | undefined): string;
|
|
10
11
|
htmlInputType(): HTMLInputType;
|
|
12
|
+
jsonSchemaType(): JSONSchemaType;
|
|
11
13
|
validate(): Validation;
|
|
12
14
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TName } from '../base/TBase.js';
|
|
2
2
|
import { TString, type TStringConstraints } from '../base/TString.js';
|
|
3
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
3
4
|
import type { RNInputMode } from '../targets/rn.js';
|
|
4
5
|
import type { HTMLInputType } from '../targets/web.js';
|
|
5
6
|
export type DomainName = string;
|
|
@@ -9,5 +10,6 @@ export declare class TDomainName extends TString<DomainName> {
|
|
|
9
10
|
tName(): TName;
|
|
10
11
|
example(): DomainName;
|
|
11
12
|
htmlInputType(): HTMLInputType;
|
|
13
|
+
jsonSchemaType(): JSONSchemaType;
|
|
12
14
|
rnInputMode(): RNInputMode;
|
|
13
15
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TName } from '../base/TBase.js';
|
|
2
2
|
import { TString, type TStringConstraints } from '../base/TString.js';
|
|
3
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
3
4
|
import type { RNInputMode } from '../targets/rn.js';
|
|
4
5
|
import type { HTMLInputType } from '../targets/web.js';
|
|
5
6
|
export type Email = string;
|
|
@@ -9,5 +10,6 @@ export declare class TEmail extends TString<Email> {
|
|
|
9
10
|
tName(): TName;
|
|
10
11
|
example(): Email;
|
|
11
12
|
htmlInputType(): HTMLInputType;
|
|
13
|
+
jsonSchemaType(): JSONSchemaType;
|
|
12
14
|
rnInputMode(): RNInputMode;
|
|
13
15
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { TName } from '../base/TBase.js';
|
|
2
2
|
import { TString } from '../base/TString.js';
|
|
3
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
3
4
|
import type { HTMLInputType } from '../targets/web.js';
|
|
4
5
|
export type EncryptionKey = string;
|
|
5
6
|
export declare class TEncryptionKey extends TString<EncryptionKey> {
|
|
6
7
|
tName(): TName;
|
|
7
8
|
example(): EncryptionKey;
|
|
8
9
|
htmlInputType(): HTMLInputType;
|
|
10
|
+
jsonSchemaType(): JSONSchemaType;
|
|
9
11
|
isSensitive(): boolean;
|
|
10
12
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ConstraintsForHuman, TName } from '../base/TBase.js';
|
|
2
2
|
import { TObject } from '../base/TObject.js';
|
|
3
|
+
import type { JSONSchemaType } from '../targets/json-schema.js';
|
|
3
4
|
import type { HTMLInputType } from '../targets/web.js';
|
|
4
5
|
import type { Validation } from '../Validation.js';
|
|
5
6
|
import { type FileMimeType } from './TFileMimeType.js';
|
|
@@ -25,6 +26,7 @@ export declare class TFile extends TObject<File> {
|
|
|
25
26
|
example(): File;
|
|
26
27
|
getConstraintsForHuman(): ConstraintsForHuman | null;
|
|
27
28
|
htmlInputType(): HTMLInputType;
|
|
29
|
+
jsonSchemaType(): JSONSchemaType;
|
|
28
30
|
validate(): Validation;
|
|
29
31
|
getFileConstraints(): TFileConstraints;
|
|
30
32
|
fmtBytes(bytes: number, decimals?: number): string;
|