@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.
Files changed (212) hide show
  1. package/dist/array/concat.d.ts +2 -2
  2. package/dist/array/flat.d.ts +1 -1
  3. package/dist/array/flatMap.d.ts +2 -2
  4. package/dist/array/from.d.ts +1 -1
  5. package/dist/array/length.d.ts +3 -2
  6. package/dist/array/push.d.ts +4 -2
  7. package/dist/chrono/createDate.cjs +1 -1
  8. package/dist/chrono/createDate.mjs +1 -1
  9. package/dist/chrono/operators/addTime.d.ts +2 -4
  10. package/dist/common/constraint/cast/index.d.ts +4 -4
  11. package/dist/common/constraint/cast/string.d.ts +4 -0
  12. package/dist/common/constraint/infer/index.d.ts +2 -1
  13. package/dist/common/constraint/infer/string.d.ts +1 -1
  14. package/dist/common/constraint/types/index.d.ts +1 -0
  15. package/dist/common/constraint/types/maybe.d.ts +2 -0
  16. package/dist/common/formData.d.ts +2 -1
  17. package/dist/common/memo.cjs +3 -2
  18. package/dist/common/memo.mjs +3 -2
  19. package/dist/common/memoPromise.cjs +3 -2
  20. package/dist/common/memoPromise.mjs +3 -2
  21. package/dist/common/timeout.cjs +2 -2
  22. package/dist/common/timeout.d.ts +1 -1
  23. package/dist/common/timeout.mjs +2 -2
  24. package/dist/common/types/applyPromiseIf.d.ts +1 -0
  25. package/dist/common/types/index.d.ts +1 -0
  26. package/dist/common/types/json.d.ts +12 -1
  27. package/dist/dataStructure/common/codec/defaults/string.cjs +1 -1
  28. package/dist/dataStructure/common/codec/defaults/string.d.ts +1 -1
  29. package/dist/dataStructure/common/codec/defaults/string.mjs +1 -1
  30. package/dist/dataStructure/common/{error.cjs → error/base.cjs} +18 -3
  31. package/dist/dataStructure/common/{error.d.ts → error/base.d.ts} +14 -7
  32. package/dist/dataStructure/common/{error.mjs → error/base.mjs} +17 -4
  33. package/dist/dataStructure/common/error/defaultInterpreter.cjs +87 -0
  34. package/dist/dataStructure/common/error/defaultInterpreter.d.ts +60 -0
  35. package/dist/dataStructure/common/error/defaultInterpreter.mjs +86 -0
  36. package/dist/dataStructure/common/error/index.d.ts +3 -0
  37. package/dist/dataStructure/common/{errorInterpreter.cjs → error/interpreter.cjs} +11 -12
  38. package/dist/dataStructure/common/error/interpreter.d.ts +32 -0
  39. package/dist/dataStructure/common/{errorInterpreter.mjs → error/interpreter.mjs} +9 -10
  40. package/dist/dataStructure/common/index.d.ts +0 -1
  41. package/dist/dataStructure/constraint/types/constraints.d.ts +1 -0
  42. package/dist/dataStructure/fundamentalType/types/fundamentalTypes.d.ts +1 -0
  43. package/dist/dataStructure/helpers/extend.cjs +1 -1
  44. package/dist/dataStructure/helpers/extend.d.ts +1 -1
  45. package/dist/dataStructure/helpers/extend.mjs +1 -1
  46. package/dist/dataStructure/helpers/index.d.ts +1 -0
  47. package/dist/dataStructure/helpers/partial.cjs +1 -1
  48. package/dist/dataStructure/helpers/partial.mjs +1 -1
  49. package/dist/dataStructure/helpers/required.cjs +1 -1
  50. package/dist/dataStructure/helpers/required.mjs +1 -1
  51. package/dist/dataStructure/helpers/typeStructureIdentifier.cjs +14 -0
  52. package/dist/dataStructure/helpers/typeStructureIdentifier.d.ts +6 -0
  53. package/dist/dataStructure/helpers/typeStructureIdentifier.mjs +14 -0
  54. package/dist/dataStructure/index.cjs +45 -33
  55. package/dist/dataStructure/index.mjs +10 -3
  56. package/dist/dataStructure/structure/base.cjs +31 -19
  57. package/dist/dataStructure/structure/base.d.ts +16 -16
  58. package/dist/dataStructure/structure/base.mjs +25 -13
  59. package/dist/dataStructure/structure/defaults/array.cjs +10 -0
  60. package/dist/dataStructure/structure/defaults/array.mjs +10 -0
  61. package/dist/dataStructure/structure/defaults/lazy.cjs +1 -0
  62. package/dist/dataStructure/structure/defaults/lazy.mjs +1 -0
  63. package/dist/dataStructure/structure/defaults/nonEncodableString.cjs +1 -0
  64. package/dist/dataStructure/structure/defaults/nonEncodableString.mjs +1 -0
  65. package/dist/dataStructure/structure/defaults/object.cjs +18 -7
  66. package/dist/dataStructure/structure/defaults/object.d.ts +2 -1
  67. package/dist/dataStructure/structure/defaults/object.mjs +18 -7
  68. package/dist/dataStructure/structure/defaults/record.cjs +20 -7
  69. package/dist/dataStructure/structure/defaults/record.mjs +20 -7
  70. package/dist/dataStructure/structure/defaults/type.cjs +1 -0
  71. package/dist/dataStructure/structure/defaults/type.mjs +1 -0
  72. package/dist/dataStructure/structure/defaults/union.cjs +26 -6
  73. package/dist/dataStructure/structure/defaults/union.mjs +21 -1
  74. package/dist/dataStructure/structure/types/value.d.ts +2 -0
  75. package/dist/dataStructure/type/types/types.d.ts +1 -0
  76. package/dist/either/index.cjs +1 -1
  77. package/dist/either/index.mjs +1 -1
  78. package/dist/either/left/create.d.ts +2 -1
  79. package/dist/either/left/none.cjs +2 -2
  80. package/dist/either/left/none.d.ts +2 -2
  81. package/dist/either/left/none.mjs +2 -2
  82. package/dist/either/right/create.d.ts +2 -1
  83. package/dist/either/types/index.d.ts +1 -0
  84. package/dist/either/types/mayBe.d.ts +1 -1
  85. package/dist/invocation/evidence.d.ts +1 -1
  86. package/dist/invocation/flow/base.cjs +4 -4
  87. package/dist/invocation/flow/base.d.ts +1 -1
  88. package/dist/invocation/flow/base.mjs +4 -4
  89. package/dist/invocation/flow/controller/defaults/debounce.cjs +1 -1
  90. package/dist/invocation/flow/controller/defaults/debounce.mjs +1 -1
  91. package/dist/invocation/flow/controller/defaults/throttling.cjs +1 -1
  92. package/dist/invocation/flow/controller/defaults/throttling.mjs +1 -1
  93. package/dist/invocation/index.cjs +10 -0
  94. package/dist/invocation/index.d.ts +2 -0
  95. package/dist/invocation/index.mjs +7 -1
  96. package/dist/invocation/reader.cjs +5 -1
  97. package/dist/invocation/reader.d.ts +5 -3
  98. package/dist/invocation/reader.mjs +5 -1
  99. package/dist/invocation/resolver.cjs +31 -0
  100. package/dist/invocation/resolver.d.ts +14 -0
  101. package/dist/invocation/resolver.mjs +31 -0
  102. package/dist/invocation/signature.cjs +8 -0
  103. package/dist/invocation/signature.d.ts +7 -0
  104. package/dist/invocation/signature.mjs +8 -0
  105. package/dist/modeling/entity/base.cjs +19 -25
  106. package/dist/modeling/entity/base.d.ts +15 -14
  107. package/dist/modeling/entity/base.mjs +14 -19
  108. package/dist/modeling/entity/helper.d.ts +6 -8
  109. package/dist/modeling/entity/namespace.cjs +0 -2
  110. package/dist/modeling/entity/namespace.d.ts +0 -2
  111. package/dist/modeling/entity/namespace.mjs +0 -2
  112. package/dist/modeling/fact/base.cjs +36 -0
  113. package/dist/modeling/fact/base.d.ts +29 -0
  114. package/dist/modeling/fact/base.mjs +35 -0
  115. package/dist/modeling/fact/index.d.ts +1 -0
  116. package/dist/modeling/flag/base.cjs +1 -1
  117. package/dist/modeling/flag/base.d.ts +8 -8
  118. package/dist/modeling/flag/base.mjs +1 -1
  119. package/dist/modeling/index.cjs +17 -18
  120. package/dist/modeling/index.d.ts +1 -0
  121. package/dist/modeling/index.mjs +8 -8
  122. package/dist/modeling/newType/base.cjs +11 -28
  123. package/dist/modeling/newType/base.d.ts +8 -15
  124. package/dist/modeling/newType/base.mjs +5 -20
  125. package/dist/modeling/taggedObject/base.cjs +19 -25
  126. package/dist/modeling/taggedObject/base.d.ts +12 -14
  127. package/dist/modeling/taggedObject/base.mjs +14 -19
  128. package/dist/object/assign.d.ts +3 -3
  129. package/dist/object/deepOverride.cjs +33 -0
  130. package/dist/object/deepOverride.d.ts +20 -0
  131. package/dist/object/deepOverride.mjs +33 -0
  132. package/dist/object/entries.d.ts +3 -3
  133. package/dist/object/index.cjs +4 -1
  134. package/dist/object/index.d.ts +1 -0
  135. package/dist/object/index.mjs +4 -2
  136. package/dist/object/isSimple.cjs +1 -1
  137. package/dist/object/isSimple.mjs +1 -1
  138. package/dist/object/keys.d.ts +1 -1
  139. package/dist/object/override.cjs +1 -1
  140. package/dist/object/override.d.ts +5 -2
  141. package/dist/object/override.mjs +1 -1
  142. package/dist/object/types/assign.d.ts +2 -0
  143. package/dist/object/types/forbiddenKey.d.ts +1 -1
  144. package/dist/object/types/hasKeySignature.d.ts +1 -0
  145. package/dist/object/types/index.d.ts +4 -1
  146. package/dist/object/types/keyofWithoutSignature.d.ts +3 -0
  147. package/dist/object/types/override.d.ts +4 -0
  148. package/dist/object/values.d.ts +1 -1
  149. package/dist/path/create.cjs +11 -0
  150. package/dist/path/create.d.ts +3 -0
  151. package/dist/path/create.mjs +11 -0
  152. package/dist/path/createAbsolute.cjs +12 -0
  153. package/dist/path/createAbsolute.d.ts +3 -0
  154. package/dist/path/createAbsolute.mjs +12 -0
  155. package/dist/path/createAbsoluteOrThrow.cjs +22 -0
  156. package/dist/path/createAbsoluteOrThrow.d.ts +9 -0
  157. package/dist/path/createAbsoluteOrThrow.mjs +21 -0
  158. package/dist/path/createOrThrow.cjs +22 -0
  159. package/dist/path/createOrThrow.d.ts +9 -0
  160. package/dist/path/createOrThrow.mjs +21 -0
  161. package/dist/path/createSegment.cjs +12 -0
  162. package/dist/path/createSegment.d.ts +3 -0
  163. package/dist/path/createSegment.mjs +12 -0
  164. package/dist/path/createSegmentOrThrow.cjs +22 -0
  165. package/dist/path/createSegmentOrThrow.d.ts +9 -0
  166. package/dist/path/createSegmentOrThrow.mjs +21 -0
  167. package/dist/path/declareAbsolutePath.cjs +6 -0
  168. package/dist/path/declareAbsolutePath.d.ts +3 -0
  169. package/dist/path/declareAbsolutePath.mjs +6 -0
  170. package/dist/path/declarePath.cjs +6 -0
  171. package/dist/path/declarePath.d.ts +3 -0
  172. package/dist/path/declarePath.mjs +6 -0
  173. package/dist/path/declareSegment.cjs +6 -0
  174. package/dist/path/declareSegment.d.ts +3 -0
  175. package/dist/path/declareSegment.mjs +6 -0
  176. package/dist/path/index.cjs +39 -3
  177. package/dist/path/index.d.ts +10 -0
  178. package/dist/path/index.mjs +27 -4
  179. package/dist/path/kind.cjs +4 -0
  180. package/dist/path/kind.d.ts +2 -0
  181. package/dist/path/kind.mjs +5 -0
  182. package/dist/pattern/index.cjs +6 -0
  183. package/dist/pattern/index.d.ts +2 -0
  184. package/dist/pattern/index.mjs +5 -1
  185. package/dist/pattern/match/builder.cjs +1 -1
  186. package/dist/pattern/match/builder.mjs +1 -1
  187. package/dist/pattern/matchWithEntityOtherwise.d.ts +2 -2
  188. package/dist/pattern/matchWithFact.cjs +12 -0
  189. package/dist/pattern/matchWithFact.d.ts +12 -0
  190. package/dist/pattern/matchWithFact.mjs +12 -0
  191. package/dist/pattern/matchWithFactOtherwise.cjs +13 -0
  192. package/dist/pattern/matchWithFactOtherwise.d.ts +14 -0
  193. package/dist/pattern/matchWithFactOtherwise.mjs +13 -0
  194. package/dist/pattern/matchWithNumberOtherwise.d.ts +2 -2
  195. package/dist/pattern/matchWithStringOtherwise.d.ts +2 -2
  196. package/dist/pattern/matchWithTaggedObjectOtherwise.d.ts +2 -2
  197. package/dist/pattern/types/complexUnMatchedValue/getIncompleteUnion.d.ts +8 -8
  198. package/dist/string/capitalize.d.ts +1 -1
  199. package/dist/string/concat.d.ts +2 -2
  200. package/dist/string/prepend.d.ts +2 -2
  201. package/dist/string/split.cjs +1 -0
  202. package/dist/string/split.d.ts +3 -3
  203. package/dist/string/split.mjs +1 -0
  204. package/dist/string/toLowerCase.d.ts +1 -1
  205. package/dist/string/toUpperCase.d.ts +1 -1
  206. package/dist/string/types/IsAllowedString.d.ts +4 -2
  207. package/dist/string/uncapitalize.d.ts +1 -1
  208. package/dist/tuple/types/map.d.ts +1 -1
  209. package/package.json +16 -30
  210. package/dist/dataStructure/common/errorInterpreter.d.ts +0 -36
  211. package/dist/object/types/assignObjects.d.ts +0 -2
  212. /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.1-beta.9",
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/lang.git"
14
+ "url": "git+https://github.com/duplojs/ecosystem.git",
15
+ "directory": "packages/lang"
15
16
  },
16
- "scripts": {
17
- "build": "./.commands/build.sh",
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.1.0",
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.md"
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 {};
@@ -1,2 +0,0 @@
1
- import type * as DCommon from '../../common';
2
- export type AssignObjects<GenericFirstObject extends object, GenericSecondObject extends object> = DCommon.SimplifyTopLevel<Omit<GenericFirstObject, keyof GenericSecondObject> & GenericSecondObject>;
File without changes