@duplojs/lang 0.0.1-beta.9 → 0.1.0-beta.1
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/array/concat.d.ts +2 -2
- package/dist/array/flat.d.ts +1 -1
- package/dist/array/flatMap.d.ts +2 -2
- package/dist/array/from.d.ts +1 -1
- package/dist/array/length.d.ts +3 -2
- package/dist/array/push.d.ts +4 -2
- package/dist/chrono/createDate.cjs +1 -1
- package/dist/chrono/createDate.mjs +1 -1
- package/dist/chrono/operators/addTime.d.ts +2 -4
- package/dist/common/constraint/cast/index.d.ts +4 -4
- package/dist/common/constraint/cast/string.d.ts +4 -0
- package/dist/common/constraint/infer/index.d.ts +2 -1
- package/dist/common/constraint/infer/string.d.ts +1 -1
- package/dist/common/constraint/types/index.d.ts +1 -0
- package/dist/common/constraint/types/maybe.d.ts +2 -0
- package/dist/common/formData.d.ts +2 -1
- package/dist/common/memo.cjs +3 -2
- package/dist/common/memo.mjs +3 -2
- package/dist/common/memoPromise.cjs +3 -2
- package/dist/common/memoPromise.mjs +3 -2
- package/dist/common/timeout.cjs +2 -2
- package/dist/common/timeout.d.ts +1 -1
- package/dist/common/timeout.mjs +2 -2
- package/dist/common/types/applyPromiseIf.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -0
- package/dist/common/types/json.d.ts +12 -1
- package/dist/dataStructure/common/codec/defaults/string.cjs +1 -1
- package/dist/dataStructure/common/codec/defaults/string.d.ts +1 -1
- package/dist/dataStructure/common/codec/defaults/string.mjs +1 -1
- package/dist/dataStructure/common/{error.cjs → error/base.cjs} +18 -3
- package/dist/dataStructure/common/{error.d.ts → error/base.d.ts} +14 -7
- package/dist/dataStructure/common/{error.mjs → error/base.mjs} +17 -4
- package/dist/dataStructure/common/error/defaultInterpreter.cjs +87 -0
- package/dist/dataStructure/common/error/defaultInterpreter.d.ts +60 -0
- package/dist/dataStructure/common/error/defaultInterpreter.mjs +86 -0
- package/dist/dataStructure/common/error/index.d.ts +3 -0
- package/dist/dataStructure/common/{errorInterpreter.cjs → error/interpreter.cjs} +11 -12
- package/dist/dataStructure/common/error/interpreter.d.ts +32 -0
- package/dist/dataStructure/common/{errorInterpreter.mjs → error/interpreter.mjs} +9 -10
- package/dist/dataStructure/common/index.d.ts +0 -1
- package/dist/dataStructure/constraint/types/constraints.d.ts +1 -0
- package/dist/dataStructure/fundamentalType/types/fundamentalTypes.d.ts +1 -0
- package/dist/dataStructure/helpers/extend.cjs +1 -1
- package/dist/dataStructure/helpers/extend.d.ts +1 -1
- package/dist/dataStructure/helpers/extend.mjs +1 -1
- package/dist/dataStructure/helpers/index.d.ts +1 -0
- package/dist/dataStructure/helpers/partial.cjs +1 -1
- package/dist/dataStructure/helpers/partial.mjs +1 -1
- package/dist/dataStructure/helpers/required.cjs +1 -1
- package/dist/dataStructure/helpers/required.mjs +1 -1
- package/dist/dataStructure/helpers/typeStructureIdentifier.cjs +14 -0
- package/dist/dataStructure/helpers/typeStructureIdentifier.d.ts +6 -0
- package/dist/dataStructure/helpers/typeStructureIdentifier.mjs +14 -0
- package/dist/dataStructure/index.cjs +45 -33
- package/dist/dataStructure/index.mjs +10 -3
- package/dist/dataStructure/structure/base.cjs +31 -19
- package/dist/dataStructure/structure/base.d.ts +16 -16
- package/dist/dataStructure/structure/base.mjs +25 -13
- package/dist/dataStructure/structure/defaults/array.cjs +10 -0
- package/dist/dataStructure/structure/defaults/array.mjs +10 -0
- package/dist/dataStructure/structure/defaults/lazy.cjs +1 -0
- package/dist/dataStructure/structure/defaults/lazy.mjs +1 -0
- package/dist/dataStructure/structure/defaults/nonEncodableString.cjs +1 -0
- package/dist/dataStructure/structure/defaults/nonEncodableString.mjs +1 -0
- package/dist/dataStructure/structure/defaults/object.cjs +18 -7
- package/dist/dataStructure/structure/defaults/object.d.ts +2 -1
- package/dist/dataStructure/structure/defaults/object.mjs +18 -7
- package/dist/dataStructure/structure/defaults/record.cjs +20 -7
- package/dist/dataStructure/structure/defaults/record.mjs +20 -7
- package/dist/dataStructure/structure/defaults/type.cjs +1 -0
- package/dist/dataStructure/structure/defaults/type.mjs +1 -0
- package/dist/dataStructure/structure/defaults/union.cjs +26 -6
- package/dist/dataStructure/structure/defaults/union.mjs +21 -1
- package/dist/dataStructure/structure/types/value.d.ts +2 -0
- package/dist/dataStructure/type/types/types.d.ts +1 -0
- package/dist/either/index.cjs +1 -1
- package/dist/either/index.mjs +1 -1
- package/dist/either/left/create.d.ts +2 -1
- package/dist/either/left/none.cjs +2 -2
- package/dist/either/left/none.d.ts +2 -2
- package/dist/either/left/none.mjs +2 -2
- package/dist/either/right/create.d.ts +2 -1
- package/dist/either/types/index.d.ts +1 -0
- package/dist/either/types/mayBe.d.ts +1 -1
- package/dist/invocation/evidence.d.ts +1 -1
- package/dist/invocation/flow/base.cjs +4 -4
- package/dist/invocation/flow/base.d.ts +1 -1
- package/dist/invocation/flow/base.mjs +4 -4
- package/dist/invocation/flow/controller/defaults/debounce.cjs +1 -1
- package/dist/invocation/flow/controller/defaults/debounce.mjs +1 -1
- package/dist/invocation/flow/controller/defaults/throttling.cjs +1 -1
- package/dist/invocation/flow/controller/defaults/throttling.mjs +1 -1
- package/dist/invocation/index.cjs +10 -0
- package/dist/invocation/index.d.ts +2 -0
- package/dist/invocation/index.mjs +7 -1
- package/dist/invocation/reader.cjs +5 -1
- package/dist/invocation/reader.d.ts +5 -3
- package/dist/invocation/reader.mjs +5 -1
- package/dist/invocation/resolver.cjs +31 -0
- package/dist/invocation/resolver.d.ts +14 -0
- package/dist/invocation/resolver.mjs +31 -0
- package/dist/invocation/signature.cjs +8 -0
- package/dist/invocation/signature.d.ts +7 -0
- package/dist/invocation/signature.mjs +8 -0
- package/dist/modeling/entity/base.cjs +19 -25
- package/dist/modeling/entity/base.d.ts +15 -14
- package/dist/modeling/entity/base.mjs +14 -19
- package/dist/modeling/entity/helper.d.ts +6 -8
- package/dist/modeling/entity/namespace.cjs +0 -2
- package/dist/modeling/entity/namespace.d.ts +0 -2
- package/dist/modeling/entity/namespace.mjs +0 -2
- package/dist/modeling/fact/base.cjs +36 -0
- package/dist/modeling/fact/base.d.ts +29 -0
- package/dist/modeling/fact/base.mjs +35 -0
- package/dist/modeling/fact/index.d.ts +1 -0
- package/dist/modeling/flag/base.cjs +1 -1
- package/dist/modeling/flag/base.d.ts +8 -8
- package/dist/modeling/flag/base.mjs +1 -1
- package/dist/modeling/index.cjs +17 -18
- package/dist/modeling/index.d.ts +1 -0
- package/dist/modeling/index.mjs +8 -8
- package/dist/modeling/newType/base.cjs +11 -28
- package/dist/modeling/newType/base.d.ts +8 -15
- package/dist/modeling/newType/base.mjs +5 -20
- package/dist/modeling/taggedObject/base.cjs +19 -25
- package/dist/modeling/taggedObject/base.d.ts +12 -14
- package/dist/modeling/taggedObject/base.mjs +14 -19
- package/dist/object/assign.d.ts +3 -3
- package/dist/object/deepOverride.cjs +33 -0
- package/dist/object/deepOverride.d.ts +20 -0
- package/dist/object/deepOverride.mjs +33 -0
- package/dist/object/entries.d.ts +3 -3
- package/dist/object/index.cjs +4 -1
- package/dist/object/index.d.ts +1 -0
- package/dist/object/index.mjs +4 -2
- package/dist/object/isSimple.cjs +1 -1
- package/dist/object/isSimple.mjs +1 -1
- package/dist/object/keys.d.ts +1 -1
- package/dist/object/override.cjs +1 -1
- package/dist/object/override.d.ts +5 -2
- package/dist/object/override.mjs +1 -1
- package/dist/object/types/assign.d.ts +2 -0
- package/dist/object/types/forbiddenKey.d.ts +1 -1
- package/dist/object/types/hasKeySignature.d.ts +1 -0
- package/dist/object/types/index.d.ts +4 -1
- package/dist/object/types/keyofWithoutSignature.d.ts +3 -0
- package/dist/object/types/override.d.ts +4 -0
- package/dist/object/values.d.ts +1 -1
- package/dist/path/create.cjs +11 -0
- package/dist/path/create.d.ts +3 -0
- package/dist/path/create.mjs +11 -0
- package/dist/path/createAbsolute.cjs +12 -0
- package/dist/path/createAbsolute.d.ts +3 -0
- package/dist/path/createAbsolute.mjs +12 -0
- package/dist/path/createAbsoluteOrThrow.cjs +22 -0
- package/dist/path/createAbsoluteOrThrow.d.ts +9 -0
- package/dist/path/createAbsoluteOrThrow.mjs +21 -0
- package/dist/path/createOrThrow.cjs +22 -0
- package/dist/path/createOrThrow.d.ts +9 -0
- package/dist/path/createOrThrow.mjs +21 -0
- package/dist/path/createSegment.cjs +12 -0
- package/dist/path/createSegment.d.ts +3 -0
- package/dist/path/createSegment.mjs +12 -0
- package/dist/path/createSegmentOrThrow.cjs +22 -0
- package/dist/path/createSegmentOrThrow.d.ts +9 -0
- package/dist/path/createSegmentOrThrow.mjs +21 -0
- package/dist/path/declareAbsolutePath.cjs +6 -0
- package/dist/path/declareAbsolutePath.d.ts +3 -0
- package/dist/path/declareAbsolutePath.mjs +6 -0
- package/dist/path/declarePath.cjs +6 -0
- package/dist/path/declarePath.d.ts +3 -0
- package/dist/path/declarePath.mjs +6 -0
- package/dist/path/declareSegment.cjs +6 -0
- package/dist/path/declareSegment.d.ts +3 -0
- package/dist/path/declareSegment.mjs +6 -0
- package/dist/path/index.cjs +39 -3
- package/dist/path/index.d.ts +10 -0
- package/dist/path/index.mjs +27 -4
- package/dist/path/kind.cjs +4 -0
- package/dist/path/kind.d.ts +2 -0
- package/dist/path/kind.mjs +5 -0
- package/dist/pattern/index.cjs +6 -0
- package/dist/pattern/index.d.ts +2 -0
- package/dist/pattern/index.mjs +5 -1
- package/dist/pattern/match/builder.cjs +1 -1
- package/dist/pattern/match/builder.mjs +1 -1
- package/dist/pattern/matchWithEntityOtherwise.d.ts +2 -2
- package/dist/pattern/matchWithFact.cjs +12 -0
- package/dist/pattern/matchWithFact.d.ts +12 -0
- package/dist/pattern/matchWithFact.mjs +12 -0
- package/dist/pattern/matchWithFactOtherwise.cjs +13 -0
- package/dist/pattern/matchWithFactOtherwise.d.ts +14 -0
- package/dist/pattern/matchWithFactOtherwise.mjs +13 -0
- package/dist/pattern/matchWithNumberOtherwise.d.ts +2 -2
- package/dist/pattern/matchWithStringOtherwise.d.ts +2 -2
- package/dist/pattern/matchWithTaggedObjectOtherwise.d.ts +2 -2
- package/dist/pattern/types/complexUnMatchedValue/getIncompleteUnion.d.ts +8 -8
- package/dist/string/capitalize.d.ts +1 -1
- package/dist/string/concat.d.ts +2 -2
- package/dist/string/prepend.d.ts +2 -2
- package/dist/string/split.cjs +1 -0
- package/dist/string/split.d.ts +3 -3
- package/dist/string/split.mjs +1 -0
- package/dist/string/toLowerCase.d.ts +1 -1
- package/dist/string/toUpperCase.d.ts +1 -1
- package/dist/string/types/IsAllowedString.d.ts +4 -2
- package/dist/string/uncapitalize.d.ts +1 -1
- package/dist/tuple/types/map.d.ts +1 -1
- package/package.json +16 -30
- package/dist/dataStructure/common/errorInterpreter.d.ts +0 -36
- package/dist/object/types/assignObjects.d.ts +0 -2
- /package/{README.md → README} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duplojs/lang",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0-beta.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -11,19 +11,11 @@
|
|
|
11
11
|
"homepage": "https://lang.duplojs.dev/",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "git+https://github.com/duplojs/
|
|
14
|
+
"url": "git+https://github.com/duplojs/ecosystem.git",
|
|
15
|
+
"directory": "packages/lang"
|
|
15
16
|
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"test:ut": "./.commands/test-ut.sh",
|
|
19
|
-
"test:ut:watch": "./.commands/test-ut.sh --watch",
|
|
20
|
-
"test:ut:update": "./.commands/test-ut.sh --update",
|
|
21
|
-
"test:types": "./.commands/test-types.sh",
|
|
22
|
-
"test:types:lib": "./.commands/test-types-lib.sh",
|
|
23
|
-
"test:types:target": "./.commands/test-types-target.sh",
|
|
24
|
-
"test:lint": "./.commands/test-lint.sh",
|
|
25
|
-
"test:lint:fix": "./.commands/test-lint.sh --fix",
|
|
26
|
-
"prepare": "husky"
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/duplojs/ecosystem/issues"
|
|
27
19
|
},
|
|
28
20
|
"sideEffects": false,
|
|
29
21
|
"types": "./dist/index.d.ts",
|
|
@@ -115,25 +107,12 @@
|
|
|
115
107
|
}
|
|
116
108
|
},
|
|
117
109
|
"devDependencies": {
|
|
118
|
-
"@duplojs/code-config": "0.1.0",
|
|
119
|
-
"@types/node": "24.
|
|
120
|
-
"husky": "9.1.7",
|
|
121
|
-
"rolldown": "1.2.4",
|
|
122
|
-
"unplugin-dts": "1.0.3",
|
|
123
|
-
"@typescript/typescript6": "6.0.2",
|
|
124
|
-
"tslib": "2.8.1",
|
|
125
|
-
"tsx": "4.23.12",
|
|
126
|
-
"tscw-config": "1.1.2",
|
|
127
|
-
"typescript": "7.0.2",
|
|
128
|
-
"vitest": "4.1.10",
|
|
129
|
-
"@vitest/coverage-istanbul": "4.1.10"
|
|
110
|
+
"@duplojs/code-config": "0.1.0-beta.1",
|
|
111
|
+
"@types/node": "24.13.3"
|
|
130
112
|
},
|
|
131
|
-
"workspaces": [
|
|
132
|
-
"docs"
|
|
133
|
-
],
|
|
134
113
|
"files": [
|
|
135
114
|
"dist",
|
|
136
|
-
"README
|
|
115
|
+
"README"
|
|
137
116
|
],
|
|
138
117
|
"keywords": [
|
|
139
118
|
"typescript",
|
|
@@ -156,5 +135,12 @@
|
|
|
156
135
|
],
|
|
157
136
|
"engines": {
|
|
158
137
|
"node": ">=24.18.0"
|
|
138
|
+
},
|
|
139
|
+
"scripts": {
|
|
140
|
+
"build": "./.commands/build.sh",
|
|
141
|
+
"test:types": "./.commands/test-types.sh",
|
|
142
|
+
"test:types:target": "./.commands/test-types-target.sh",
|
|
143
|
+
"test:lint": "./.commands/test-lint.sh",
|
|
144
|
+
"test:lint:fix": "./.commands/test-lint.sh --fix"
|
|
159
145
|
}
|
|
160
|
-
}
|
|
146
|
+
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Structure, Structures } from '../structure';
|
|
2
|
-
import { createKind } from '../kind';
|
|
3
|
-
import { Type, Types } from '../type';
|
|
4
|
-
import { Constraint, Constraints } from '../constraint';
|
|
5
|
-
import { Error, DecodeIssue, EncodeIssue, Issue } from './error';
|
|
6
|
-
import { Codec } from './codec';
|
|
7
|
-
import * as DKind from '../../kind';
|
|
8
|
-
import * as DCommon from '../../common';
|
|
9
|
-
declare const kindNamespaceName: DKind.GetNamespaceName<typeof createKind>;
|
|
10
|
-
type RemoveNamespace<GenericString> = GenericString extends `@${typeof kindNamespaceName}/${infer InferredKindName}` ? InferredKindName : never;
|
|
11
|
-
export interface InterpretedMessage {
|
|
12
|
-
source?: string;
|
|
13
|
-
interpretedSource?: string;
|
|
14
|
-
subSource?: string;
|
|
15
|
-
interpretedSubSource?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface InterpretedIssue extends Issue {
|
|
18
|
-
interpretedMessage: InterpretedMessage;
|
|
19
|
-
}
|
|
20
|
-
export interface InterpretedEncodedIssue extends EncodeIssue {
|
|
21
|
-
interpretedMessage: InterpretedMessage;
|
|
22
|
-
}
|
|
23
|
-
export interface InterpretedDecodedIssue extends DecodeIssue {
|
|
24
|
-
interpretedMessage: InterpretedMessage;
|
|
25
|
-
}
|
|
26
|
-
export type InterpretedIssues = (InterpretedIssue | InterpretedEncodedIssue | InterpretedDecodedIssue);
|
|
27
|
-
type StructureDictionaryParams = DCommon.SimplifyTopLevel<Omit<{
|
|
28
|
-
[DataStructure in (Types | Structures | Constraints) as RemoveNamespace<DKind.GetName<DataStructure>>]?: (structure: DataStructure, issue: Issue) => string;
|
|
29
|
-
}, RemoveNamespace<DKind.GetName<Type>> | RemoveNamespace<DKind.GetName<Structure>> | RemoveNamespace<DKind.GetName<Constraint>>>>;
|
|
30
|
-
type CodecDictionaryParams = [
|
|
31
|
-
Codec,
|
|
32
|
-
(codec: Codec, issue: EncodeIssue | DecodeIssue) => string
|
|
33
|
-
][];
|
|
34
|
-
export declare function createErrorInterpreter(structureDictionary?: StructureDictionaryParams, codecDictionary?: CodecDictionaryParams): (error: Error) => readonly InterpretedIssues[];
|
|
35
|
-
export type ErrorInterpreter = ReturnType<typeof createErrorInterpreter>;
|
|
36
|
-
export {};
|
/package/{README.md → README}
RENAMED
|
File without changes
|