@duplojs/server 0.1.0-beta.1 → 0.1.0-beta.3
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/_virtual/_rolldown/runtime.mjs +5 -1
- package/dist/command/create.cjs +11 -9
- package/dist/command/create.mjs +11 -9
- package/dist/command/error.cjs +2 -2
- package/dist/command/error.mjs +1 -1
- package/dist/command/help.cjs +11 -9
- package/dist/command/help.mjs +10 -8
- package/dist/common/environmentVariable/parseEnvironmentFiles.d.ts +2 -1
- package/dist/common/index.cjs +3 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.mjs +3 -1
- package/dist/common/meta/getCurrentDirectoryName.cjs +10 -0
- package/dist/common/meta/getCurrentDirectoryName.d.ts +7 -0
- package/dist/common/meta/getCurrentDirectoryName.mjs +7 -0
- package/dist/common/meta/index.d.ts +7 -0
- package/dist/dataStructure/common/codec/defaults/json.cjs +12 -1
- package/dist/dataStructure/common/codec/defaults/json.d.ts +2 -2
- package/dist/dataStructure/common/codec/defaults/json.mjs +12 -1
- package/dist/dataStructure/common/codec/defaults/string.cjs +12 -1
- package/dist/dataStructure/common/codec/defaults/string.d.ts +2 -2
- package/dist/dataStructure/common/codec/defaults/string.mjs +12 -1
- package/dist/dataStructure/common/error/defaultInterpreter.cjs +3 -1
- package/dist/dataStructure/common/error/defaultInterpreter.d.ts +7 -2
- package/dist/dataStructure/common/error/defaultInterpreter.mjs +3 -1
- package/dist/dataStructure/constraint/{exist.cjs → fileExist.cjs} +5 -5
- package/dist/dataStructure/constraint/fileExist.d.ts +10 -0
- package/dist/dataStructure/constraint/{exist.mjs → fileExist.mjs} +4 -4
- package/dist/dataStructure/constraint/folderExist.cjs +19 -0
- package/dist/dataStructure/constraint/folderExist.d.ts +10 -0
- package/dist/dataStructure/constraint/folderExist.mjs +15 -0
- package/dist/dataStructure/constraint/index.d.ts +2 -1
- package/dist/dataStructure/constraint/mimeType.cjs +1 -1
- package/dist/dataStructure/constraint/mimeType.mjs +1 -1
- package/dist/dataStructure/constraint/types/constraints.d.ts +4 -2
- package/dist/dataStructure/fundamentalType/folder.cjs +11 -0
- package/dist/dataStructure/fundamentalType/folder.d.ts +8 -0
- package/dist/dataStructure/fundamentalType/folder.mjs +8 -0
- package/dist/dataStructure/fundamentalType/index.d.ts +1 -0
- package/dist/dataStructure/fundamentalType/types/fundamentalTypes.d.ts +2 -0
- package/dist/dataStructure/helper/file.d.ts +1 -1
- package/dist/dataStructure/helper/fileExist.cjs +7 -0
- package/dist/dataStructure/helper/fileExist.d.ts +2 -0
- package/dist/dataStructure/helper/fileExist.mjs +7 -0
- package/dist/dataStructure/helper/folder.cjs +10 -0
- package/dist/dataStructure/helper/folder.d.ts +3 -0
- package/dist/dataStructure/helper/folder.mjs +8 -0
- package/dist/dataStructure/helper/folderExist.cjs +7 -0
- package/dist/dataStructure/helper/folderExist.d.ts +2 -0
- package/dist/dataStructure/helper/folderExist.mjs +7 -0
- package/dist/dataStructure/helper/index.d.ts +3 -1
- package/dist/dataStructure/index.cjs +29 -8
- package/dist/dataStructure/index.mjs +19 -6
- package/dist/dataStructure/type/folder.cjs +14 -0
- package/dist/dataStructure/type/folder.d.ts +11 -0
- package/dist/dataStructure/type/folder.mjs +11 -0
- package/dist/dataStructure/type/index.d.ts +1 -0
- package/dist/dataStructure/type/types/types.d.ts +2 -0
- package/dist/file/appendFile.cjs +36 -22
- package/dist/file/appendFile.d.ts +34 -2
- package/dist/file/appendFile.mjs +35 -22
- package/dist/file/appendTextFile.cjs +34 -20
- package/dist/file/appendTextFile.d.ts +34 -2
- package/dist/file/appendTextFile.mjs +33 -20
- package/dist/file/copy.cjs +26 -14
- package/dist/file/copy.d.ts +34 -2
- package/dist/file/copy.mjs +25 -14
- package/dist/file/createEntryInterface.cjs +2 -2
- package/dist/file/createEntryInterface.d.ts +1 -1
- package/dist/file/createEntryInterface.mjs +1 -1
- package/dist/file/ensureDirectory.cjs +29 -17
- package/dist/file/ensureDirectory.d.ts +28 -2
- package/dist/file/ensureDirectory.mjs +28 -17
- package/dist/file/ensureFile.cjs +32 -19
- package/dist/file/ensureFile.d.ts +31 -2
- package/dist/file/ensureFile.mjs +31 -19
- package/dist/file/exists.cjs +23 -14
- package/dist/file/exists.d.ts +19 -2
- package/dist/file/exists.mjs +22 -14
- package/dist/file/fileInterface.cjs +2 -0
- package/dist/file/fileInterface.d.ts +8 -6
- package/dist/file/fileInterface.mjs +2 -1
- package/dist/file/folderInterface.cjs +2 -0
- package/dist/file/folderInterface.d.ts +7 -5
- package/dist/file/folderInterface.mjs +2 -1
- package/dist/file/index.cjs +6 -0
- package/dist/file/index.d.ts +0 -1
- package/dist/file/index.mjs +7 -4
- package/dist/file/link.cjs +37 -22
- package/dist/file/link.d.ts +37 -2
- package/dist/file/link.mjs +36 -22
- package/dist/file/linkStat.cjs +23 -15
- package/dist/file/linkStat.d.ts +22 -2
- package/dist/file/linkStat.mjs +23 -15
- package/dist/file/makeDirectory.cjs +35 -21
- package/dist/file/makeDirectory.d.ts +33 -2
- package/dist/file/makeDirectory.mjs +34 -21
- package/dist/file/makeTemporaryDirectory.cjs +26 -15
- package/dist/file/makeTemporaryDirectory.d.ts +25 -2
- package/dist/file/makeTemporaryDirectory.mjs +25 -15
- package/dist/file/makeTemporaryFile.cjs +29 -20
- package/dist/file/makeTemporaryFile.d.ts +28 -2
- package/dist/file/makeTemporaryFile.mjs +29 -20
- package/dist/file/move.cjs +38 -23
- package/dist/file/move.d.ts +37 -2
- package/dist/file/move.mjs +37 -23
- package/dist/file/readDirectory.cjs +27 -9
- package/dist/file/readDirectory.d.ts +26 -5
- package/dist/file/readDirectory.mjs +24 -9
- package/dist/file/readFile.cjs +28 -17
- package/dist/file/readFile.d.ts +25 -2
- package/dist/file/readFile.mjs +27 -17
- package/dist/file/readJsonFile.cjs +28 -17
- package/dist/file/readJsonFile.d.ts +25 -3
- package/dist/file/readJsonFile.mjs +27 -17
- package/dist/file/readLink.cjs +25 -15
- package/dist/file/readLink.d.ts +22 -2
- package/dist/file/readLink.mjs +24 -15
- package/dist/file/readTextFile.cjs +28 -17
- package/dist/file/readTextFile.d.ts +25 -2
- package/dist/file/readTextFile.mjs +27 -17
- package/dist/file/realPath.cjs +22 -13
- package/dist/file/realPath.d.ts +19 -2
- package/dist/file/realPath.mjs +21 -13
- package/dist/file/relocate.cjs +41 -25
- package/dist/file/relocate.d.ts +37 -2
- package/dist/file/relocate.mjs +40 -25
- package/dist/file/remove.cjs +36 -23
- package/dist/file/remove.d.ts +30 -2
- package/dist/file/remove.mjs +35 -23
- package/dist/file/rename.cjs +41 -25
- package/dist/file/rename.d.ts +37 -2
- package/dist/file/rename.mjs +40 -25
- package/dist/file/setMode.cjs +23 -15
- package/dist/file/setMode.d.ts +21 -2
- package/dist/file/setMode.mjs +23 -15
- package/dist/file/setOwner.cjs +25 -15
- package/dist/file/setOwner.d.ts +22 -2
- package/dist/file/setOwner.mjs +24 -15
- package/dist/file/setTime.cjs +25 -15
- package/dist/file/setTime.d.ts +21 -2
- package/dist/file/setTime.mjs +24 -15
- package/dist/file/stat.cjs +23 -15
- package/dist/file/stat.d.ts +22 -2
- package/dist/file/stat.mjs +23 -15
- package/dist/file/symlink.cjs +33 -20
- package/dist/file/symlink.d.ts +31 -2
- package/dist/file/symlink.mjs +32 -20
- package/dist/file/truncate.cjs +33 -21
- package/dist/file/truncate.d.ts +34 -2
- package/dist/file/truncate.mjs +33 -21
- package/dist/file/unknownEntryInterface.cjs +2 -0
- package/dist/file/unknownEntryInterface.d.ts +7 -5
- package/dist/file/unknownEntryInterface.mjs +2 -1
- package/dist/file/walkDirectory.cjs +28 -15
- package/dist/file/walkDirectory.d.ts +23 -2
- package/dist/file/walkDirectory.mjs +27 -14
- package/dist/file/writeFile.cjs +35 -21
- package/dist/file/writeFile.d.ts +34 -2
- package/dist/file/writeFile.mjs +34 -21
- package/dist/file/writeJsonFile.cjs +38 -27
- package/dist/file/writeJsonFile.d.ts +36 -5
- package/dist/file/writeJsonFile.mjs +38 -27
- package/dist/file/writeTextFile.cjs +35 -21
- package/dist/file/writeTextFile.d.ts +34 -2
- package/dist/file/writeTextFile.mjs +34 -21
- package/dist/implementor.cjs +8 -5
- package/dist/implementor.d.ts +4 -4
- package/dist/implementor.mjs +8 -5
- package/dist/index.cjs +2 -0
- package/dist/index.mjs +2 -1
- package/package.json +4 -4
- package/dist/dataStructure/constraint/exist.d.ts +0 -10
- package/dist/dataStructure/helper/exist.cjs +0 -7
- package/dist/dataStructure/helper/exist.d.ts +0 -2
- package/dist/dataStructure/helper/exist.mjs +0 -7
- package/dist/file/types/fileSystemEither.d.ts +0 -2
- package/dist/file/types/index.d.ts +0 -1
- /package/{README → README.md} +0 -0
|
@@ -9,5 +9,9 @@ var __exportAll = (all, no_symbols) => {
|
|
|
9
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
10
|
return target;
|
|
11
11
|
};
|
|
12
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
13
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
14
|
+
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
15
|
+
});
|
|
12
16
|
//#endregion
|
|
13
|
-
export { __exportAll };
|
|
17
|
+
export { __exportAll, __require };
|
package/dist/command/create.cjs
CHANGED
|
@@ -51,19 +51,21 @@ function create(...args) {
|
|
|
51
51
|
}
|
|
52
52
|
const commandOptions = await _duplojs_lang_generator.asyncReduce(self.options, _duplojs_lang_generator.reduceFrom({
|
|
53
53
|
options: {},
|
|
54
|
-
restArgs: args
|
|
55
|
-
|
|
54
|
+
restArgs: args,
|
|
55
|
+
hasError: false
|
|
56
|
+
}), async ({ item: option, lastValue, next }) => {
|
|
56
57
|
const optionResult = await option.execute(lastValue.restArgs, error);
|
|
57
|
-
if (optionResult === require_error.SymbolCommandError) return
|
|
58
|
+
if (optionResult === require_error.SymbolCommandError) return next(_duplojs_lang_object.override(lastValue, { hasError: true }));
|
|
58
59
|
return next({
|
|
59
60
|
options: _duplojs_lang_object.override(lastValue.options, { [option.name]: optionResult.result }),
|
|
60
|
-
restArgs: optionResult.argumentRest
|
|
61
|
+
restArgs: optionResult.argumentRest,
|
|
62
|
+
hasError: lastValue.hasError
|
|
61
63
|
});
|
|
62
64
|
});
|
|
63
|
-
if (commandOptions ===
|
|
65
|
+
if (commandOptions.hasError === true) return require_error.SymbolCommandError;
|
|
64
66
|
if (self.subject?.type === "argument") {
|
|
65
|
-
if (self.subject.args.length
|
|
66
|
-
const
|
|
67
|
+
if (self.subject.args.length < commandOptions.restArgs.length) return error.addTooMuchCommandArgumentIssue(self.subject.args.length, commandOptions.restArgs.length);
|
|
68
|
+
const commandArgs = await _duplojs_lang_generator.asyncReduce(self.subject.args, _duplojs_lang_generator.reduceFrom({
|
|
67
69
|
args: {},
|
|
68
70
|
restArgs: commandOptions.restArgs
|
|
69
71
|
}), async ({ item: argument, lastValue, next, exit }) => {
|
|
@@ -75,10 +77,10 @@ function create(...args) {
|
|
|
75
77
|
restArgs: _duplojs_lang_array.shift(lastValue.restArgs)
|
|
76
78
|
});
|
|
77
79
|
});
|
|
78
|
-
if (
|
|
80
|
+
if (commandArgs === require_error.SymbolCommandError) return require_error.SymbolCommandError;
|
|
79
81
|
await execute({
|
|
80
82
|
options: commandOptions.options,
|
|
81
|
-
args:
|
|
83
|
+
args: commandArgs.args
|
|
82
84
|
});
|
|
83
85
|
} else {
|
|
84
86
|
if (commandOptions.restArgs.length > 0) return error.addTooMuchCommandArgumentIssue(0, commandOptions.restArgs.length);
|
package/dist/command/create.mjs
CHANGED
|
@@ -46,19 +46,21 @@ function create(...args) {
|
|
|
46
46
|
}
|
|
47
47
|
const commandOptions = await DGenerator.asyncReduce(self.options, DGenerator.reduceFrom({
|
|
48
48
|
options: {},
|
|
49
|
-
restArgs: args
|
|
50
|
-
|
|
49
|
+
restArgs: args,
|
|
50
|
+
hasError: false
|
|
51
|
+
}), async ({ item: option, lastValue, next }) => {
|
|
51
52
|
const optionResult = await option.execute(lastValue.restArgs, error);
|
|
52
|
-
if (optionResult === SymbolCommandError) return
|
|
53
|
+
if (optionResult === SymbolCommandError) return next(DObject.override(lastValue, { hasError: true }));
|
|
53
54
|
return next({
|
|
54
55
|
options: DObject.override(lastValue.options, { [option.name]: optionResult.result }),
|
|
55
|
-
restArgs: optionResult.argumentRest
|
|
56
|
+
restArgs: optionResult.argumentRest,
|
|
57
|
+
hasError: lastValue.hasError
|
|
56
58
|
});
|
|
57
59
|
});
|
|
58
|
-
if (commandOptions ===
|
|
60
|
+
if (commandOptions.hasError === true) return SymbolCommandError;
|
|
59
61
|
if (self.subject?.type === "argument") {
|
|
60
|
-
if (self.subject.args.length
|
|
61
|
-
const
|
|
62
|
+
if (self.subject.args.length < commandOptions.restArgs.length) return error.addTooMuchCommandArgumentIssue(self.subject.args.length, commandOptions.restArgs.length);
|
|
63
|
+
const commandArgs = await DGenerator.asyncReduce(self.subject.args, DGenerator.reduceFrom({
|
|
62
64
|
args: {},
|
|
63
65
|
restArgs: commandOptions.restArgs
|
|
64
66
|
}), async ({ item: argument, lastValue, next, exit }) => {
|
|
@@ -70,10 +72,10 @@ function create(...args) {
|
|
|
70
72
|
restArgs: DArray.shift(lastValue.restArgs)
|
|
71
73
|
});
|
|
72
74
|
});
|
|
73
|
-
if (
|
|
75
|
+
if (commandArgs === SymbolCommandError) return SymbolCommandError;
|
|
74
76
|
await execute({
|
|
75
77
|
options: commandOptions.options,
|
|
76
|
-
args:
|
|
78
|
+
args: commandArgs.args
|
|
77
79
|
});
|
|
78
80
|
} else {
|
|
79
81
|
if (commandOptions.restArgs.length > 0) return error.addTooMuchCommandArgumentIssue(0, commandOptions.restArgs.length);
|
package/dist/command/error.cjs
CHANGED
|
@@ -2,12 +2,12 @@ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
|
2
2
|
const require_defaultInterpreter = require("../dataStructure/common/error/defaultInterpreter.cjs");
|
|
3
3
|
let _duplojs_lang_common = require("@duplojs/lang/common");
|
|
4
4
|
_duplojs_lang_common = require_runtime.__toESM(_duplojs_lang_common, 1);
|
|
5
|
+
let _duplojs_lang_pattern = require("@duplojs/lang/pattern");
|
|
6
|
+
_duplojs_lang_pattern = require_runtime.__toESM(_duplojs_lang_pattern, 1);
|
|
5
7
|
let _duplojs_lang_dataStructure = require("@duplojs/lang/dataStructure");
|
|
6
8
|
_duplojs_lang_dataStructure = require_runtime.__toESM(_duplojs_lang_dataStructure, 1);
|
|
7
9
|
let _duplojs_lang_array = require("@duplojs/lang/array");
|
|
8
10
|
_duplojs_lang_array = require_runtime.__toESM(_duplojs_lang_array, 1);
|
|
9
|
-
let _duplojs_lang_pattern = require("@duplojs/lang/pattern");
|
|
10
|
-
_duplojs_lang_pattern = require_runtime.__toESM(_duplojs_lang_pattern, 1);
|
|
11
11
|
let _duplojs_lang_string = require("@duplojs/lang/string");
|
|
12
12
|
_duplojs_lang_string = require_runtime.__toESM(_duplojs_lang_string, 1);
|
|
13
13
|
let _duplojs_lang_printer = require("@duplojs/lang/printer");
|
package/dist/command/error.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defaultErrorInterpreterCodecDictionary, defaultErrorInterpreterDataStructureDictionary } from "../dataStructure/common/error/defaultInterpreter.mjs";
|
|
2
2
|
import * as DCommon from "@duplojs/lang/common";
|
|
3
|
+
import * as DPattern from "@duplojs/lang/pattern";
|
|
3
4
|
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
4
5
|
import * as DArray from "@duplojs/lang/array";
|
|
5
|
-
import * as DPattern from "@duplojs/lang/pattern";
|
|
6
6
|
import * as DString from "@duplojs/lang/string";
|
|
7
7
|
import * as DPrinter from "@duplojs/lang/printer";
|
|
8
8
|
import * as DModeling from "@duplojs/lang/modeling";
|
package/dist/command/help.cjs
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
-
const
|
|
2
|
+
const require_fileExist = require("../dataStructure/constraint/fileExist.cjs");
|
|
3
|
+
const require_folderExist = require("../dataStructure/constraint/folderExist.cjs");
|
|
3
4
|
const require_mimeType = require("../dataStructure/constraint/mimeType.cjs");
|
|
4
5
|
const require_size = require("../dataStructure/constraint/size.cjs");
|
|
5
6
|
const require_file = require("../dataStructure/type/file.cjs");
|
|
7
|
+
const require_folder = require("../dataStructure/type/folder.cjs");
|
|
6
8
|
const require_array = require("./options/defaults/array.cjs");
|
|
7
9
|
const require_boolean = require("./options/defaults/boolean.cjs");
|
|
8
10
|
const require_simple = require("./options/defaults/simple.cjs");
|
|
9
11
|
let _duplojs_lang_common = require("@duplojs/lang/common");
|
|
10
12
|
_duplojs_lang_common = require_runtime.__toESM(_duplojs_lang_common, 1);
|
|
13
|
+
let _duplojs_lang_pattern = require("@duplojs/lang/pattern");
|
|
14
|
+
_duplojs_lang_pattern = require_runtime.__toESM(_duplojs_lang_pattern, 1);
|
|
11
15
|
let _duplojs_lang_dataStructure = require("@duplojs/lang/dataStructure");
|
|
12
16
|
_duplojs_lang_dataStructure = require_runtime.__toESM(_duplojs_lang_dataStructure, 1);
|
|
13
17
|
let _duplojs_lang_array = require("@duplojs/lang/array");
|
|
14
18
|
_duplojs_lang_array = require_runtime.__toESM(_duplojs_lang_array, 1);
|
|
15
|
-
let _duplojs_lang_pattern = require("@duplojs/lang/pattern");
|
|
16
|
-
_duplojs_lang_pattern = require_runtime.__toESM(_duplojs_lang_pattern, 1);
|
|
17
19
|
let _duplojs_lang_string = require("@duplojs/lang/string");
|
|
18
20
|
_duplojs_lang_string = require_runtime.__toESM(_duplojs_lang_string, 1);
|
|
19
21
|
let _duplojs_lang_printer = require("@duplojs/lang/printer");
|
|
@@ -53,7 +55,7 @@ function formatBytes(value) {
|
|
|
53
55
|
return `${Number.isInteger(size) ? size : size.toFixed(1)} ${units[index]}`;
|
|
54
56
|
}
|
|
55
57
|
function renderType(type) {
|
|
56
|
-
return _duplojs_lang_pattern.match(type).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.stringLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.numberLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.bigintLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.booleanLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.nullTypeKind), _duplojs_lang_common.justReturn([literal("null")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.undefinedTypeKind), _duplojs_lang_common.justReturn([literal("undefined")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.stringTypeKind), _duplojs_lang_common.justReturn([typeLabel("string")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.numberTypeKind), _duplojs_lang_common.justReturn([typeLabel("number")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.bigintTypeKind), _duplojs_lang_common.justReturn([typeLabel("bigint")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.booleanTypeKind), _duplojs_lang_common.justReturn([typeLabel("boolean")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.dateTypeKind), _duplojs_lang_common.justReturn([typeLabel("date")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.timeTypeKind), _duplojs_lang_common.justReturn([typeLabel("time")])).when(_duplojs_lang_dataStructure.typeIdentifier(require_file.fileTypeKind), _duplojs_lang_common.justReturn([typeLabel("file")])).otherwise(_duplojs_lang_common.justReturn([typeLabel("unknown")]));
|
|
58
|
+
return _duplojs_lang_pattern.match(type).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.stringLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.numberLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.bigintLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.booleanLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.nullTypeKind), _duplojs_lang_common.justReturn([literal("null")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.undefinedTypeKind), _duplojs_lang_common.justReturn([literal("undefined")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.stringTypeKind), _duplojs_lang_common.justReturn([typeLabel("string")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.numberTypeKind), _duplojs_lang_common.justReturn([typeLabel("number")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.bigintTypeKind), _duplojs_lang_common.justReturn([typeLabel("bigint")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.booleanTypeKind), _duplojs_lang_common.justReturn([typeLabel("boolean")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.dateTypeKind), _duplojs_lang_common.justReturn([typeLabel("date")])).when(_duplojs_lang_dataStructure.typeIdentifier(_duplojs_lang_dataStructure.timeTypeKind), _duplojs_lang_common.justReturn([typeLabel("time")])).when(_duplojs_lang_dataStructure.typeIdentifier(require_file.fileTypeKind), _duplojs_lang_common.justReturn([typeLabel("file")])).when(_duplojs_lang_dataStructure.typeIdentifier(require_folder.folderTypeKind), _duplojs_lang_common.justReturn([typeLabel("folder")])).otherwise(_duplojs_lang_common.justReturn([typeLabel("unknown")]));
|
|
57
59
|
}
|
|
58
60
|
function renderStringLength(constraints) {
|
|
59
61
|
const equal = _duplojs_lang_array.find(constraints, _duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.stringLengthEqualConstraintKind));
|
|
@@ -83,7 +85,7 @@ function renderNumberBounds(constraints) {
|
|
|
83
85
|
return _duplojs_lang_array.filter([greaterThan ? [constraintLabel("> "), literal(String(greaterThan.definition.threshold))] : greaterThanOrEqual ? [constraintLabel("min "), literal(String(greaterThanOrEqual.definition.threshold))] : null, lessThan ? [constraintLabel("< "), literal(String(lessThan.definition.threshold))] : lessThanOrEqual ? [constraintLabel("max "), literal(String(lessThanOrEqual.definition.threshold))] : null], _duplojs_lang_common.truthy);
|
|
84
86
|
}
|
|
85
87
|
function renderSimpleConstraint(constraint) {
|
|
86
|
-
return _duplojs_lang_pattern.match(constraint).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.emailConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("email")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.urlConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("url")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.uuidConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("uuid")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.integerConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("integer")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.trimmedConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("trimmed")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.notEmptyConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("not empty")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.numberInStringConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("number in string")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.evenConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("even")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.oddConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("odd")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.positiveConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("positive")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.negativeConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("negative")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.notZeroConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("not zero")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.safeConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("safe number")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.pathConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("path")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.absolutePathConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("absolute path")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.segmentPathConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("path segment")])).when(_duplojs_lang_dataStructure.constraintIdentifier(
|
|
88
|
+
return _duplojs_lang_pattern.match(constraint).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.emailConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("email")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.urlConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("url")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.uuidConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("uuid")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.integerConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("integer")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.trimmedConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("trimmed")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.notEmptyConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("not empty")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.numberInStringConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("number in string")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.evenConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("even")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.oddConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("odd")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.positiveConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("positive")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.negativeConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("negative")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.notZeroConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("not zero")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.safeConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("safe number")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.pathConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("path")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.absolutePathConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("absolute path")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.segmentPathConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("path segment")])).when(_duplojs_lang_dataStructure.constraintIdentifier(require_fileExist.fileExistConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("exists")])).when(_duplojs_lang_dataStructure.constraintIdentifier(require_folderExist.folderExistConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("exists")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.strictPositiveConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("> "), literal("0")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.strictNegativeConstraintKind), _duplojs_lang_common.justReturn([constraintLabel("< "), literal("0")])).when(_duplojs_lang_dataStructure.constraintIdentifier(_duplojs_lang_dataStructure.betweenThanConstraintKind), ({ definition }) => [
|
|
87
89
|
constraintLabel("> "),
|
|
88
90
|
literal(String(definition.greater)),
|
|
89
91
|
secondary(" and "),
|
|
@@ -192,8 +194,8 @@ function renderOptionDetails(option, depth) {
|
|
|
192
194
|
const help = renderDataStructure(option.dataStructure);
|
|
193
195
|
return _duplojs_lang_array.filter([
|
|
194
196
|
renderInline([_duplojs_lang_printer.indent(depth), renderMetadata(help, option.required ? "required" : "optional")]),
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
...renderConstraintLines(help.constraints, depth),
|
|
198
|
+
renderDescriptionLine(option.description, depth)
|
|
197
199
|
], _duplojs_lang_common.truthy);
|
|
198
200
|
}
|
|
199
201
|
if (require_boolean.booleanOptionKind.has(option)) return _duplojs_lang_array.filter([renderInline([_duplojs_lang_printer.indent(depth), typeLabel("boolean")]), renderDescriptionLine(option.description, depth)], _duplojs_lang_common.truthy);
|
|
@@ -211,8 +213,8 @@ function renderArgumentsHelp(args, depth) {
|
|
|
211
213
|
name(argument.name.padEnd(12)),
|
|
212
214
|
renderMetadata(help, argument.optional ? "optional" : "required")
|
|
213
215
|
]),
|
|
214
|
-
|
|
215
|
-
|
|
216
|
+
renderConstraintLines(help.constraints, depth + 2),
|
|
217
|
+
renderDescriptionLine(argument.description, depth + 2)
|
|
216
218
|
]);
|
|
217
219
|
})]);
|
|
218
220
|
}
|
package/dist/command/help.mjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fileExistConstraintKind } from "../dataStructure/constraint/fileExist.mjs";
|
|
2
|
+
import { folderExistConstraintKind } from "../dataStructure/constraint/folderExist.mjs";
|
|
2
3
|
import { mimeTypeConstraintKind } from "../dataStructure/constraint/mimeType.mjs";
|
|
3
4
|
import { sizeConstraintKind } from "../dataStructure/constraint/size.mjs";
|
|
4
5
|
import { fileTypeKind } from "../dataStructure/type/file.mjs";
|
|
6
|
+
import { folderTypeKind } from "../dataStructure/type/folder.mjs";
|
|
5
7
|
import { arrayOptionKind } from "./options/defaults/array.mjs";
|
|
6
8
|
import { booleanOptionKind, createBooleanOption } from "./options/defaults/boolean.mjs";
|
|
7
9
|
import { simpleOptionKind } from "./options/defaults/simple.mjs";
|
|
8
10
|
import * as DCommon from "@duplojs/lang/common";
|
|
11
|
+
import * as DPattern from "@duplojs/lang/pattern";
|
|
9
12
|
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
10
13
|
import * as DArray from "@duplojs/lang/array";
|
|
11
|
-
import * as DPattern from "@duplojs/lang/pattern";
|
|
12
14
|
import * as DString from "@duplojs/lang/string";
|
|
13
15
|
import * as DPrinter from "@duplojs/lang/printer";
|
|
14
16
|
//#region scripts/command/help.ts
|
|
@@ -46,7 +48,7 @@ function formatBytes(value) {
|
|
|
46
48
|
return `${Number.isInteger(size) ? size : size.toFixed(1)} ${units[index]}`;
|
|
47
49
|
}
|
|
48
50
|
function renderType(type) {
|
|
49
|
-
return DPattern.match(type).when(DDataStructure.typeIdentifier(DDataStructure.stringLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(DDataStructure.typeIdentifier(DDataStructure.numberLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(DDataStructure.typeIdentifier(DDataStructure.bigintLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(DDataStructure.typeIdentifier(DDataStructure.booleanLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(DDataStructure.typeIdentifier(DDataStructure.nullTypeKind), DCommon.justReturn([literal("null")])).when(DDataStructure.typeIdentifier(DDataStructure.undefinedTypeKind), DCommon.justReturn([literal("undefined")])).when(DDataStructure.typeIdentifier(DDataStructure.stringTypeKind), DCommon.justReturn([typeLabel("string")])).when(DDataStructure.typeIdentifier(DDataStructure.numberTypeKind), DCommon.justReturn([typeLabel("number")])).when(DDataStructure.typeIdentifier(DDataStructure.bigintTypeKind), DCommon.justReturn([typeLabel("bigint")])).when(DDataStructure.typeIdentifier(DDataStructure.booleanTypeKind), DCommon.justReturn([typeLabel("boolean")])).when(DDataStructure.typeIdentifier(DDataStructure.dateTypeKind), DCommon.justReturn([typeLabel("date")])).when(DDataStructure.typeIdentifier(DDataStructure.timeTypeKind), DCommon.justReturn([typeLabel("time")])).when(DDataStructure.typeIdentifier(fileTypeKind), DCommon.justReturn([typeLabel("file")])).otherwise(DCommon.justReturn([typeLabel("unknown")]));
|
|
51
|
+
return DPattern.match(type).when(DDataStructure.typeIdentifier(DDataStructure.stringLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(DDataStructure.typeIdentifier(DDataStructure.numberLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(DDataStructure.typeIdentifier(DDataStructure.bigintLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(DDataStructure.typeIdentifier(DDataStructure.booleanLiteralTypeKind), ({ definition }) => [literal(formatLiteral(definition.value))]).when(DDataStructure.typeIdentifier(DDataStructure.nullTypeKind), DCommon.justReturn([literal("null")])).when(DDataStructure.typeIdentifier(DDataStructure.undefinedTypeKind), DCommon.justReturn([literal("undefined")])).when(DDataStructure.typeIdentifier(DDataStructure.stringTypeKind), DCommon.justReturn([typeLabel("string")])).when(DDataStructure.typeIdentifier(DDataStructure.numberTypeKind), DCommon.justReturn([typeLabel("number")])).when(DDataStructure.typeIdentifier(DDataStructure.bigintTypeKind), DCommon.justReturn([typeLabel("bigint")])).when(DDataStructure.typeIdentifier(DDataStructure.booleanTypeKind), DCommon.justReturn([typeLabel("boolean")])).when(DDataStructure.typeIdentifier(DDataStructure.dateTypeKind), DCommon.justReturn([typeLabel("date")])).when(DDataStructure.typeIdentifier(DDataStructure.timeTypeKind), DCommon.justReturn([typeLabel("time")])).when(DDataStructure.typeIdentifier(fileTypeKind), DCommon.justReturn([typeLabel("file")])).when(DDataStructure.typeIdentifier(folderTypeKind), DCommon.justReturn([typeLabel("folder")])).otherwise(DCommon.justReturn([typeLabel("unknown")]));
|
|
50
52
|
}
|
|
51
53
|
function renderStringLength(constraints) {
|
|
52
54
|
const equal = DArray.find(constraints, DDataStructure.constraintIdentifier(DDataStructure.stringLengthEqualConstraintKind));
|
|
@@ -76,7 +78,7 @@ function renderNumberBounds(constraints) {
|
|
|
76
78
|
return DArray.filter([greaterThan ? [constraintLabel("> "), literal(String(greaterThan.definition.threshold))] : greaterThanOrEqual ? [constraintLabel("min "), literal(String(greaterThanOrEqual.definition.threshold))] : null, lessThan ? [constraintLabel("< "), literal(String(lessThan.definition.threshold))] : lessThanOrEqual ? [constraintLabel("max "), literal(String(lessThanOrEqual.definition.threshold))] : null], DCommon.truthy);
|
|
77
79
|
}
|
|
78
80
|
function renderSimpleConstraint(constraint) {
|
|
79
|
-
return DPattern.match(constraint).when(DDataStructure.constraintIdentifier(DDataStructure.emailConstraintKind), DCommon.justReturn([constraintLabel("email")])).when(DDataStructure.constraintIdentifier(DDataStructure.urlConstraintKind), DCommon.justReturn([constraintLabel("url")])).when(DDataStructure.constraintIdentifier(DDataStructure.uuidConstraintKind), DCommon.justReturn([constraintLabel("uuid")])).when(DDataStructure.constraintIdentifier(DDataStructure.integerConstraintKind), DCommon.justReturn([constraintLabel("integer")])).when(DDataStructure.constraintIdentifier(DDataStructure.trimmedConstraintKind), DCommon.justReturn([constraintLabel("trimmed")])).when(DDataStructure.constraintIdentifier(DDataStructure.notEmptyConstraintKind), DCommon.justReturn([constraintLabel("not empty")])).when(DDataStructure.constraintIdentifier(DDataStructure.numberInStringConstraintKind), DCommon.justReturn([constraintLabel("number in string")])).when(DDataStructure.constraintIdentifier(DDataStructure.evenConstraintKind), DCommon.justReturn([constraintLabel("even")])).when(DDataStructure.constraintIdentifier(DDataStructure.oddConstraintKind), DCommon.justReturn([constraintLabel("odd")])).when(DDataStructure.constraintIdentifier(DDataStructure.positiveConstraintKind), DCommon.justReturn([constraintLabel("positive")])).when(DDataStructure.constraintIdentifier(DDataStructure.negativeConstraintKind), DCommon.justReturn([constraintLabel("negative")])).when(DDataStructure.constraintIdentifier(DDataStructure.notZeroConstraintKind), DCommon.justReturn([constraintLabel("not zero")])).when(DDataStructure.constraintIdentifier(DDataStructure.safeConstraintKind), DCommon.justReturn([constraintLabel("safe number")])).when(DDataStructure.constraintIdentifier(DDataStructure.pathConstraintKind), DCommon.justReturn([constraintLabel("path")])).when(DDataStructure.constraintIdentifier(DDataStructure.absolutePathConstraintKind), DCommon.justReturn([constraintLabel("absolute path")])).when(DDataStructure.constraintIdentifier(DDataStructure.segmentPathConstraintKind), DCommon.justReturn([constraintLabel("path segment")])).when(DDataStructure.constraintIdentifier(
|
|
81
|
+
return DPattern.match(constraint).when(DDataStructure.constraintIdentifier(DDataStructure.emailConstraintKind), DCommon.justReturn([constraintLabel("email")])).when(DDataStructure.constraintIdentifier(DDataStructure.urlConstraintKind), DCommon.justReturn([constraintLabel("url")])).when(DDataStructure.constraintIdentifier(DDataStructure.uuidConstraintKind), DCommon.justReturn([constraintLabel("uuid")])).when(DDataStructure.constraintIdentifier(DDataStructure.integerConstraintKind), DCommon.justReturn([constraintLabel("integer")])).when(DDataStructure.constraintIdentifier(DDataStructure.trimmedConstraintKind), DCommon.justReturn([constraintLabel("trimmed")])).when(DDataStructure.constraintIdentifier(DDataStructure.notEmptyConstraintKind), DCommon.justReturn([constraintLabel("not empty")])).when(DDataStructure.constraintIdentifier(DDataStructure.numberInStringConstraintKind), DCommon.justReturn([constraintLabel("number in string")])).when(DDataStructure.constraintIdentifier(DDataStructure.evenConstraintKind), DCommon.justReturn([constraintLabel("even")])).when(DDataStructure.constraintIdentifier(DDataStructure.oddConstraintKind), DCommon.justReturn([constraintLabel("odd")])).when(DDataStructure.constraintIdentifier(DDataStructure.positiveConstraintKind), DCommon.justReturn([constraintLabel("positive")])).when(DDataStructure.constraintIdentifier(DDataStructure.negativeConstraintKind), DCommon.justReturn([constraintLabel("negative")])).when(DDataStructure.constraintIdentifier(DDataStructure.notZeroConstraintKind), DCommon.justReturn([constraintLabel("not zero")])).when(DDataStructure.constraintIdentifier(DDataStructure.safeConstraintKind), DCommon.justReturn([constraintLabel("safe number")])).when(DDataStructure.constraintIdentifier(DDataStructure.pathConstraintKind), DCommon.justReturn([constraintLabel("path")])).when(DDataStructure.constraintIdentifier(DDataStructure.absolutePathConstraintKind), DCommon.justReturn([constraintLabel("absolute path")])).when(DDataStructure.constraintIdentifier(DDataStructure.segmentPathConstraintKind), DCommon.justReturn([constraintLabel("path segment")])).when(DDataStructure.constraintIdentifier(fileExistConstraintKind), DCommon.justReturn([constraintLabel("exists")])).when(DDataStructure.constraintIdentifier(folderExistConstraintKind), DCommon.justReturn([constraintLabel("exists")])).when(DDataStructure.constraintIdentifier(DDataStructure.strictPositiveConstraintKind), DCommon.justReturn([constraintLabel("> "), literal("0")])).when(DDataStructure.constraintIdentifier(DDataStructure.strictNegativeConstraintKind), DCommon.justReturn([constraintLabel("< "), literal("0")])).when(DDataStructure.constraintIdentifier(DDataStructure.betweenThanConstraintKind), ({ definition }) => [
|
|
80
82
|
constraintLabel("> "),
|
|
81
83
|
literal(String(definition.greater)),
|
|
82
84
|
secondary(" and "),
|
|
@@ -185,8 +187,8 @@ function renderOptionDetails(option, depth) {
|
|
|
185
187
|
const help = renderDataStructure(option.dataStructure);
|
|
186
188
|
return DArray.filter([
|
|
187
189
|
renderInline([DPrinter.indent(depth), renderMetadata(help, option.required ? "required" : "optional")]),
|
|
188
|
-
|
|
189
|
-
|
|
190
|
+
...renderConstraintLines(help.constraints, depth),
|
|
191
|
+
renderDescriptionLine(option.description, depth)
|
|
190
192
|
], DCommon.truthy);
|
|
191
193
|
}
|
|
192
194
|
if (booleanOptionKind.has(option)) return DArray.filter([renderInline([DPrinter.indent(depth), typeLabel("boolean")]), renderDescriptionLine(option.description, depth)], DCommon.truthy);
|
|
@@ -204,8 +206,8 @@ function renderArgumentsHelp(args, depth) {
|
|
|
204
206
|
name(argument.name.padEnd(12)),
|
|
205
207
|
renderMetadata(help, argument.optional ? "optional" : "required")
|
|
206
208
|
]),
|
|
207
|
-
|
|
208
|
-
|
|
209
|
+
renderConstraintLines(help.constraints, depth + 2),
|
|
210
|
+
renderDescriptionLine(argument.description, depth + 2)
|
|
209
211
|
]);
|
|
210
212
|
})]);
|
|
211
213
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type * as DPath from "@duplojs/lang/path";
|
|
2
2
|
import * as DEither from "@duplojs/lang/either";
|
|
3
|
+
import * as DSFile from '../../file';
|
|
3
4
|
export declare function parseEnvironmentLine(line: string): Record<string, string>;
|
|
4
|
-
export declare function parseEnvironmentFiles(baseEnv: Record<string, string>, paths: (string & DPath.Path)[]): Promise<DEither.Left<"file-system-read-text-file-
|
|
5
|
+
export declare function parseEnvironmentFiles(baseEnv: Record<string, string>, paths: (string & DPath.Path)[]): Promise<DEither.Left<"file-system-read-text-file-error", DSFile.ReadTextFileErrors> | Record<string, string>[]>;
|
package/dist/common/index.cjs
CHANGED
|
@@ -7,6 +7,7 @@ const require_index = require("./environmentVariable/index.cjs");
|
|
|
7
7
|
const require_environmentVariableOrThrow = require("./environmentVariableOrThrow.cjs");
|
|
8
8
|
const require_exitProcess = require("./exitProcess.cjs");
|
|
9
9
|
const require_getProcessArguments = require("./getProcessArguments.cjs");
|
|
10
|
+
const require_getCurrentDirectoryName = require("./meta/getCurrentDirectoryName.cjs");
|
|
10
11
|
//#region scripts/common/index.ts
|
|
11
12
|
var common_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
12
13
|
EnvironmentVariableError: () => require_environmentVariableOrThrow.EnvironmentVariableError,
|
|
@@ -15,6 +16,7 @@ var common_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
15
16
|
environmentVariable: () => require_index.environmentVariable,
|
|
16
17
|
environmentVariableOrThrow: () => require_environmentVariableOrThrow.environmentVariableOrThrow,
|
|
17
18
|
exitProcess: () => require_exitProcess.exitProcess,
|
|
19
|
+
getCurrentDirectoryName: () => require_getCurrentDirectoryName.getCurrentDirectoryName,
|
|
18
20
|
getCurrentWorkDirectory: () => require_getCurrentWorkDirectory.getCurrentWorkDirectory,
|
|
19
21
|
getCurrentWorkDirectoryOrThrow: () => require_getCurrentWorkDirectoryOrThrow.getCurrentWorkDirectoryOrThrow,
|
|
20
22
|
getProcessArguments: () => require_getProcessArguments.getProcessArguments,
|
|
@@ -34,6 +36,7 @@ Object.defineProperty(exports, "common_exports", {
|
|
|
34
36
|
exports.environmentVariable = require_index.environmentVariable;
|
|
35
37
|
exports.environmentVariableOrThrow = require_environmentVariableOrThrow.environmentVariableOrThrow;
|
|
36
38
|
exports.exitProcess = require_exitProcess.exitProcess;
|
|
39
|
+
exports.getCurrentDirectoryName = require_getCurrentDirectoryName.getCurrentDirectoryName;
|
|
37
40
|
exports.getCurrentWorkDirectory = require_getCurrentWorkDirectory.getCurrentWorkDirectory;
|
|
38
41
|
exports.getCurrentWorkDirectoryOrThrow = require_getCurrentWorkDirectoryOrThrow.getCurrentWorkDirectoryOrThrow;
|
|
39
42
|
exports.getProcessArguments = require_getProcessArguments.getProcessArguments;
|
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { environmentVariable } from "./environmentVariable/index.mjs";
|
|
|
7
7
|
import { EnvironmentVariableError, environmentVariableOrThrow } from "./environmentVariableOrThrow.mjs";
|
|
8
8
|
import { exitProcess } from "./exitProcess.mjs";
|
|
9
9
|
import { getProcessArguments } from "./getProcessArguments.mjs";
|
|
10
|
+
import { getCurrentDirectoryName } from "./meta/getCurrentDirectoryName.mjs";
|
|
10
11
|
//#region scripts/common/index.ts
|
|
11
12
|
var common_exports = /* @__PURE__ */ __exportAll({
|
|
12
13
|
EnvironmentVariableError: () => EnvironmentVariableError,
|
|
@@ -15,6 +16,7 @@ var common_exports = /* @__PURE__ */ __exportAll({
|
|
|
15
16
|
environmentVariable: () => environmentVariable,
|
|
16
17
|
environmentVariableOrThrow: () => environmentVariableOrThrow,
|
|
17
18
|
exitProcess: () => exitProcess,
|
|
19
|
+
getCurrentDirectoryName: () => getCurrentDirectoryName,
|
|
18
20
|
getCurrentWorkDirectory: () => getCurrentWorkDirectory,
|
|
19
21
|
getCurrentWorkDirectoryOrThrow: () => getCurrentWorkDirectoryOrThrow,
|
|
20
22
|
getProcessArguments: () => getProcessArguments,
|
|
@@ -22,4 +24,4 @@ var common_exports = /* @__PURE__ */ __exportAll({
|
|
|
22
24
|
setCurrentWorkingDirectoryOrThrow: () => setCurrentWorkingDirectoryOrThrow
|
|
23
25
|
});
|
|
24
26
|
//#endregion
|
|
25
|
-
export { EnvironmentVariableError, GetCurrentWorkDirectoryError, SetCurrentWorkingDirectoryError, common_exports, environmentVariable, environmentVariableOrThrow, exitProcess, getCurrentWorkDirectory, getCurrentWorkDirectoryOrThrow, getProcessArguments, setCurrentWorkingDirectory, setCurrentWorkingDirectoryOrThrow };
|
|
27
|
+
export { EnvironmentVariableError, GetCurrentWorkDirectoryError, SetCurrentWorkingDirectoryError, common_exports, environmentVariable, environmentVariableOrThrow, exitProcess, getCurrentDirectoryName, getCurrentWorkDirectory, getCurrentWorkDirectoryOrThrow, getProcessArguments, setCurrentWorkingDirectory, setCurrentWorkingDirectoryOrThrow };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_implementor = require("../../implementor.cjs");
|
|
3
|
+
let _duplojs_lang_common = require("@duplojs/lang/common");
|
|
4
|
+
_duplojs_lang_common = require_runtime.__toESM(_duplojs_lang_common, 1);
|
|
5
|
+
let _duplojs_lang_path = require("@duplojs/lang/path");
|
|
6
|
+
_duplojs_lang_path = require_runtime.__toESM(_duplojs_lang_path, 1);
|
|
7
|
+
//#region scripts/common/meta/getCurrentDirectoryName.ts
|
|
8
|
+
const getCurrentDirectoryName = require_implementor.implementFunction("getCurrentDirectoryName", { NODE: (importMeta) => _duplojs_lang_common.pipe(importMeta.dirname, _duplojs_lang_path.createAbsoluteOrThrow) });
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.getCurrentDirectoryName = getCurrentDirectoryName;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as DPath from "@duplojs/lang/path";
|
|
2
|
+
declare module '../../implementor' {
|
|
3
|
+
interface ServerFunction {
|
|
4
|
+
getCurrentDirectoryName(importMeta: ImportMeta): string & DPath.Absolute;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare const getCurrentDirectoryName: (importMeta: ImportMeta) => string & DPath.Absolute;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { implementFunction } from "../../implementor.mjs";
|
|
2
|
+
import * as DCommon from "@duplojs/lang/common";
|
|
3
|
+
import * as DPath from "@duplojs/lang/path";
|
|
4
|
+
//#region scripts/common/meta/getCurrentDirectoryName.ts
|
|
5
|
+
const getCurrentDirectoryName = implementFunction("getCurrentDirectoryName", { NODE: (importMeta) => DCommon.pipe(importMeta.dirname, DPath.createAbsoluteOrThrow) });
|
|
6
|
+
//#endregion
|
|
7
|
+
export { getCurrentDirectoryName };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as DKind from "@duplojs/lang/kind";
|
|
2
|
+
declare const importMetaKind: DKind.Handler<DKind.Definition<"@DuplojsServer/import-meta", unknown>>;
|
|
3
|
+
declare global {
|
|
4
|
+
interface ImportMeta extends DKind.Kind<typeof importMetaKind> {
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export * from './getCurrentDirectoryName';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const require_runtime = require("../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
const require_fileInterface = require("../../../../file/fileInterface.cjs");
|
|
3
|
+
const require_folderInterface = require("../../../../file/folderInterface.cjs");
|
|
3
4
|
const require_file = require("../../../fundamentalType/file.cjs");
|
|
5
|
+
const require_folder = require("../../../fundamentalType/folder.cjs");
|
|
4
6
|
let _duplojs_lang_path = require("@duplojs/lang/path");
|
|
5
7
|
_duplojs_lang_path = require_runtime.__toESM(_duplojs_lang_path, 1);
|
|
6
8
|
let _duplojs_lang_dataStructure = require("@duplojs/lang/dataStructure");
|
|
@@ -8,7 +10,16 @@ _duplojs_lang_dataStructure = require_runtime.__toESM(_duplojs_lang_dataStructur
|
|
|
8
10
|
//#region scripts/dataStructure/common/codec/defaults/json.ts
|
|
9
11
|
const codecsJson = _duplojs_lang_dataStructure.createCodecs({
|
|
10
12
|
..._duplojs_lang_dataStructure.codecsJson.definition,
|
|
11
|
-
file: _duplojs_lang_dataStructure.createCodec(require_file.TheFile, (data) => typeof data === "string"
|
|
13
|
+
file: _duplojs_lang_dataStructure.createCodec(require_file.TheFile, (data) => typeof data === "string", (data) => data.path, (data) => {
|
|
14
|
+
const result = _duplojs_lang_path.normalize(data);
|
|
15
|
+
if (!result) return _duplojs_lang_dataStructure.ErrorSymbol;
|
|
16
|
+
return require_fileInterface.createFileInterface(result);
|
|
17
|
+
}),
|
|
18
|
+
folder: _duplojs_lang_dataStructure.createCodec(require_folder.TheFolder, (data) => typeof data === "string", (data) => data.path, (data) => {
|
|
19
|
+
const result = _duplojs_lang_path.normalize(data);
|
|
20
|
+
if (!result) return _duplojs_lang_dataStructure.ErrorSymbol;
|
|
21
|
+
return require_folderInterface.createFolderInterface(result);
|
|
22
|
+
})
|
|
12
23
|
});
|
|
13
24
|
//#endregion
|
|
14
25
|
exports.codecsJson = codecsJson;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as DPath from "@duplojs/lang/path";
|
|
2
1
|
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
3
2
|
import * as FundamentalType from "../../../fundamentalType";
|
|
4
3
|
export declare const codecsJson: DDataStructure.Codecs<{
|
|
5
|
-
file: DDataStructure.Codec<FundamentalType.TheFile, string
|
|
4
|
+
file: DDataStructure.Codec<FundamentalType.TheFile, string>;
|
|
5
|
+
folder: DDataStructure.Codec<FundamentalType.TheFolder, string>;
|
|
6
6
|
bigint: import('@duplojs/lang/dataStructure').Codec<DDataStructure.TheBigint, string>;
|
|
7
7
|
date: import('@duplojs/lang/dataStructure').Codec<DDataStructure.TheDate, string>;
|
|
8
8
|
time: import('@duplojs/lang/dataStructure').Codec<DDataStructure.TheTime, string>;
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { createFileInterface } from "../../../../file/fileInterface.mjs";
|
|
2
|
+
import { createFolderInterface } from "../../../../file/folderInterface.mjs";
|
|
2
3
|
import { TheFile } from "../../../fundamentalType/file.mjs";
|
|
4
|
+
import { TheFolder } from "../../../fundamentalType/folder.mjs";
|
|
3
5
|
import * as DPath from "@duplojs/lang/path";
|
|
4
6
|
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
5
7
|
//#region scripts/dataStructure/common/codec/defaults/json.ts
|
|
6
8
|
const codecsJson = DDataStructure.createCodecs({
|
|
7
9
|
...DDataStructure.codecsJson.definition,
|
|
8
|
-
file: DDataStructure.createCodec(TheFile, (data) => typeof data === "string"
|
|
10
|
+
file: DDataStructure.createCodec(TheFile, (data) => typeof data === "string", (data) => data.path, (data) => {
|
|
11
|
+
const result = DPath.normalize(data);
|
|
12
|
+
if (!result) return DDataStructure.ErrorSymbol;
|
|
13
|
+
return createFileInterface(result);
|
|
14
|
+
}),
|
|
15
|
+
folder: DDataStructure.createCodec(TheFolder, (data) => typeof data === "string", (data) => data.path, (data) => {
|
|
16
|
+
const result = DPath.normalize(data);
|
|
17
|
+
if (!result) return DDataStructure.ErrorSymbol;
|
|
18
|
+
return createFolderInterface(result);
|
|
19
|
+
})
|
|
9
20
|
});
|
|
10
21
|
//#endregion
|
|
11
22
|
export { codecsJson };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const require_runtime = require("../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
const require_fileInterface = require("../../../../file/fileInterface.cjs");
|
|
3
|
+
const require_folderInterface = require("../../../../file/folderInterface.cjs");
|
|
3
4
|
const require_file = require("../../../fundamentalType/file.cjs");
|
|
5
|
+
const require_folder = require("../../../fundamentalType/folder.cjs");
|
|
4
6
|
let _duplojs_lang_path = require("@duplojs/lang/path");
|
|
5
7
|
_duplojs_lang_path = require_runtime.__toESM(_duplojs_lang_path, 1);
|
|
6
8
|
let _duplojs_lang_dataStructure = require("@duplojs/lang/dataStructure");
|
|
@@ -8,7 +10,16 @@ _duplojs_lang_dataStructure = require_runtime.__toESM(_duplojs_lang_dataStructur
|
|
|
8
10
|
//#region scripts/dataStructure/common/codec/defaults/string.ts
|
|
9
11
|
const codecsString = _duplojs_lang_dataStructure.createCodecs({
|
|
10
12
|
..._duplojs_lang_dataStructure.codecsString.definition,
|
|
11
|
-
file: _duplojs_lang_dataStructure.createCodec(require_file.TheFile, (data) => typeof data === "string"
|
|
13
|
+
file: _duplojs_lang_dataStructure.createCodec(require_file.TheFile, (data) => typeof data === "string", (data) => data.path, (data) => {
|
|
14
|
+
const result = _duplojs_lang_path.normalize(data);
|
|
15
|
+
if (!result) return _duplojs_lang_dataStructure.ErrorSymbol;
|
|
16
|
+
return require_fileInterface.createFileInterface(result);
|
|
17
|
+
}),
|
|
18
|
+
folder: _duplojs_lang_dataStructure.createCodec(require_folder.TheFolder, (data) => typeof data === "string", (data) => data.path, (data) => {
|
|
19
|
+
const result = _duplojs_lang_path.normalize(data);
|
|
20
|
+
if (!result) return _duplojs_lang_dataStructure.ErrorSymbol;
|
|
21
|
+
return require_folderInterface.createFolderInterface(result);
|
|
22
|
+
})
|
|
12
23
|
});
|
|
13
24
|
//#endregion
|
|
14
25
|
exports.codecsString = codecsString;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as DPath from "@duplojs/lang/path";
|
|
2
1
|
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
3
2
|
import * as FundamentalType from "../../../fundamentalType";
|
|
4
3
|
export declare const codecsString: DDataStructure.Codecs<{
|
|
5
|
-
file: DDataStructure.Codec<FundamentalType.TheFile, string
|
|
4
|
+
file: DDataStructure.Codec<FundamentalType.TheFile, string>;
|
|
5
|
+
folder: DDataStructure.Codec<FundamentalType.TheFolder, string>;
|
|
6
6
|
bigint: import('@duplojs/lang/dataStructure').Codec<DDataStructure.TheBigint, string>;
|
|
7
7
|
boolean: import('@duplojs/lang/dataStructure').Codec<DDataStructure.TheBoolean, "true" | "false">;
|
|
8
8
|
date: import('@duplojs/lang/dataStructure').Codec<DDataStructure.TheDate, string>;
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { createFileInterface } from "../../../../file/fileInterface.mjs";
|
|
2
|
+
import { createFolderInterface } from "../../../../file/folderInterface.mjs";
|
|
2
3
|
import { TheFile } from "../../../fundamentalType/file.mjs";
|
|
4
|
+
import { TheFolder } from "../../../fundamentalType/folder.mjs";
|
|
3
5
|
import * as DPath from "@duplojs/lang/path";
|
|
4
6
|
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
5
7
|
//#region scripts/dataStructure/common/codec/defaults/string.ts
|
|
6
8
|
const codecsString = DDataStructure.createCodecs({
|
|
7
9
|
...DDataStructure.codecsString.definition,
|
|
8
|
-
file: DDataStructure.createCodec(TheFile, (data) => typeof data === "string"
|
|
10
|
+
file: DDataStructure.createCodec(TheFile, (data) => typeof data === "string", (data) => data.path, (data) => {
|
|
11
|
+
const result = DPath.normalize(data);
|
|
12
|
+
if (!result) return DDataStructure.ErrorSymbol;
|
|
13
|
+
return createFileInterface(result);
|
|
14
|
+
}),
|
|
15
|
+
folder: DDataStructure.createCodec(TheFolder, (data) => typeof data === "string", (data) => data.path, (data) => {
|
|
16
|
+
const result = DPath.normalize(data);
|
|
17
|
+
if (!result) return DDataStructure.ErrorSymbol;
|
|
18
|
+
return createFolderInterface(result);
|
|
19
|
+
})
|
|
9
20
|
});
|
|
10
21
|
//#endregion
|
|
11
22
|
export { codecsString };
|
|
@@ -6,6 +6,7 @@ _duplojs_lang_dataStructure = require_runtime.__toESM(_duplojs_lang_dataStructur
|
|
|
6
6
|
const defaultErrorInterpreterDataStructureDictionary = {
|
|
7
7
|
..._duplojs_lang_dataStructure.defaultErrorInterpreterDataStructureDictionary,
|
|
8
8
|
"@DuplojsServerDataStructure/file-type": () => "Expected a valid file.",
|
|
9
|
+
"@DuplojsServerDataStructure/folder-type": () => "Expected a valid folder.",
|
|
9
10
|
"@DuplojsServerDataStructure/size-constraint": (source) => {
|
|
10
11
|
const { min, max } = source.definition;
|
|
11
12
|
if (min !== void 0 && max !== void 0) return `Expected a file size between ${min} and ${max} bytes.`;
|
|
@@ -14,7 +15,8 @@ const defaultErrorInterpreterDataStructureDictionary = {
|
|
|
14
15
|
return "Expected a valid file size.";
|
|
15
16
|
},
|
|
16
17
|
"@DuplojsServerDataStructure/mime-type-constraint": (source) => `Expected a file with a MIME type matching ${source.definition.regex.toString()}.`,
|
|
17
|
-
"@DuplojsServerDataStructure/exist-constraint": () => "Expected the file to exist."
|
|
18
|
+
"@DuplojsServerDataStructure/file-exist-constraint": () => "Expected the file to exist.",
|
|
19
|
+
"@DuplojsServerDataStructure/folder-exist-constraint": () => "Expected the folder to exist."
|
|
18
20
|
};
|
|
19
21
|
const defaultErrorInterpreterCodecDictionary = [..._duplojs_lang_dataStructure.defaultErrorInterpreterCodecDictionary, [require_json.codecsJson.definition.file, (_codec, issue) => {
|
|
20
22
|
if (issue.from === "predicate") return _duplojs_lang_dataStructure.encodeIssueKind.has(issue) ? "The JSON file codec must produce a valid file path string." : "Expected a valid file path string for the JSON file codec.";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
2
2
|
export declare const defaultErrorInterpreterDataStructureDictionary: {
|
|
3
3
|
readonly "@DuplojsServerDataStructure/file-type": () => string;
|
|
4
|
+
readonly "@DuplojsServerDataStructure/folder-type": () => string;
|
|
4
5
|
readonly "@DuplojsServerDataStructure/size-constraint": (source: import('../..').SizeConstraint) => string;
|
|
5
6
|
readonly "@DuplojsServerDataStructure/mime-type-constraint": (source: import('../..').MimeTypeConstraint) => string;
|
|
6
|
-
readonly "@DuplojsServerDataStructure/exist-constraint": () => string;
|
|
7
|
+
readonly "@DuplojsServerDataStructure/file-exist-constraint": () => string;
|
|
8
|
+
readonly "@DuplojsServerDataStructure/folder-exist-constraint": () => string;
|
|
7
9
|
readonly "@DuplojsLangDataStructure/array-structure": () => string;
|
|
8
10
|
readonly "@DuplojsLangDataStructure/lazy-structure": () => string;
|
|
9
11
|
readonly "@DuplojsLangDataStructure/non-encodable-string-structure": (source: import('@duplojs/lang/dataStructure').NonEncodableStringStructure) => string;
|
|
@@ -29,9 +31,11 @@ export declare const defaultErrorInterpreterDataStructureDictionary: {
|
|
|
29
31
|
readonly "@DuplojsLangDataStructure/between-than-constraint": (source: import('@duplojs/lang/dataStructure').BetweenThanConstraint<number, number>) => string;
|
|
30
32
|
readonly "@DuplojsLangDataStructure/between-than-or-equal-constraint": (source: import('@duplojs/lang/dataStructure').BetweenThanOrEqualConstraint<number, number>) => string;
|
|
31
33
|
readonly "@DuplojsLangDataStructure/email-constraint": () => string;
|
|
34
|
+
readonly "@DuplojsLangDataStructure/ends-with-constraint": (source: import('@duplojs/lang/dataStructure').EndsWithConstraint<string>) => string;
|
|
32
35
|
readonly "@DuplojsLangDataStructure/even-constraint": () => string;
|
|
33
36
|
readonly "@DuplojsLangDataStructure/greater-than-constraint": (source: import('@duplojs/lang/dataStructure').GreaterThanConstraint<number>) => string;
|
|
34
37
|
readonly "@DuplojsLangDataStructure/greater-than-or-equal-constraint": (source: import('@duplojs/lang/dataStructure').GreaterThanOrEqualConstraint<number>) => string;
|
|
38
|
+
readonly "@DuplojsLangDataStructure/include-constraint": (source: import('@duplojs/lang/dataStructure').IncludeConstraint<string>) => string;
|
|
35
39
|
readonly "@DuplojsLangDataStructure/integer-constraint": () => string;
|
|
36
40
|
readonly "@DuplojsLangDataStructure/less-than-constraint": (source: import('@duplojs/lang/dataStructure').LessThanConstraint<number>) => string;
|
|
37
41
|
readonly "@DuplojsLangDataStructure/less-than-or-equal-constraint": (source: import('@duplojs/lang/dataStructure').LessThanOrEqualConstraint<number>) => string;
|
|
@@ -51,6 +55,7 @@ export declare const defaultErrorInterpreterDataStructureDictionary: {
|
|
|
51
55
|
readonly "@DuplojsLangDataStructure/regex-constraint": (source: import('@duplojs/lang/dataStructure').RegexConstraint) => string;
|
|
52
56
|
readonly "@DuplojsLangDataStructure/safe-constraint": () => string;
|
|
53
57
|
readonly "@DuplojsLangDataStructure/segment-path-constraint": () => string;
|
|
58
|
+
readonly "@DuplojsLangDataStructure/starts-with-constraint": (source: import('@duplojs/lang/dataStructure').StartsWithConstraint<string>) => string;
|
|
54
59
|
readonly "@DuplojsLangDataStructure/strict-negative-constraint": () => string;
|
|
55
60
|
readonly "@DuplojsLangDataStructure/strict-positive-constraint": () => string;
|
|
56
61
|
readonly "@DuplojsLangDataStructure/string-length-equal-constraint": (source: import('@duplojs/lang/dataStructure').StringLengthEqualConstraint<number>) => string;
|
|
@@ -61,4 +66,4 @@ export declare const defaultErrorInterpreterDataStructureDictionary: {
|
|
|
61
66
|
readonly "@DuplojsLangModeling/new-type-structure": () => string;
|
|
62
67
|
readonly "@DuplojsLangModeling/tagged-object-structure": (source: import('@duplojs/lang/modeling').TaggedObjectStructure<import('@duplojs/lang/modeling').ObjectTag<string>>) => string;
|
|
63
68
|
};
|
|
64
|
-
export declare const defaultErrorInterpreterCodecDictionary: [[DDataStructure.Codec<DDataStructure.TheBigint, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheDate, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheTime, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheBigint, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheBoolean, "true" | "false">, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheDate, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheNull, "null">, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheNumber, string & import('@duplojs/lang/string').Number>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheTime, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheUndefined, "undefined" | undefined>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<import('../..').TheFile, string
|
|
69
|
+
export declare const defaultErrorInterpreterCodecDictionary: [[DDataStructure.Codec<DDataStructure.TheBigint, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheDate, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheTime, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheBigint, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheBoolean, "true" | "false">, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheDate, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheNull, "null">, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheNumber, string & import('@duplojs/lang/string').Number>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheTime, string>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<DDataStructure.TheUndefined, "undefined" | undefined>, (codec: import('@duplojs/lang/dataStructure').Codec, issue: import('@duplojs/lang/dataStructure').EncodeIssue | import('@duplojs/lang/dataStructure').DecodeIssue) => string], [DDataStructure.Codec<import('../..').TheFile, string>, (_codec: DDataStructure.Codec<DDataStructure.FundamentalType<unknown>, unknown>, issue: DDataStructure.EncodeIssue | DDataStructure.DecodeIssue) => string]];
|