@duplojs/agents-kit 0.1.0-beta.3 → 0.1.0-beta.6
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/README.md +11 -11
- package/dist/bin/index.mjs +2 -2
- package/dist/bin/installSkill/index.d.ts +2 -0
- package/dist/bin/{install → installSkill}/index.mjs +3 -3
- package/dist/bin/{install → installSkill}/skill.mjs +1 -1
- package/dist/bin/setup/instructions.d.ts +1 -1
- package/docs/API/10-lang/10-array/10-at.ts +4 -4
- package/docs/API/10-lang/10-array/10-coalescing.ts +3 -2
- package/docs/API/10-lang/10-array/10-indexOf.ts +1 -1
- package/docs/API/10-lang/10-array/10-is.ts +17 -3
- package/docs/API/10-lang/10-array/10-lastIndexOf.ts +1 -1
- package/docs/API/10-lang/10-chrono/10-addTime.ts +1 -1
- package/docs/API/10-lang/10-chrono/10-closestTo.ts +5 -8
- package/docs/API/10-lang/10-chrono/10-isDate.ts +15 -2
- package/docs/API/10-lang/10-chrono/10-isSerializedTheDate.ts +16 -1
- package/docs/API/10-lang/10-chrono/10-isSerializedTheTime.ts +16 -1
- package/docs/API/10-lang/10-chrono/10-isTime.ts +15 -2
- package/docs/API/10-lang/10-chrono/10-maxDate.ts +4 -8
- package/docs/API/10-lang/10-chrono/10-maxTime.ts +4 -8
- package/docs/API/10-lang/10-chrono/10-minDate.ts +4 -8
- package/docs/API/10-lang/10-chrono/10-minTime.ts +4 -8
- package/docs/API/10-lang/10-chrono/10-sortDates.ts +6 -8
- package/docs/API/10-lang/10-chrono/10-sortTimes.ts +6 -8
- package/docs/API/10-lang/10-chrono/10-subtractTime.ts +1 -1
- package/docs/API/10-lang/10-common/10-and.ts +6 -0
- package/docs/API/10-lang/10-common/10-createQueue.ts +4 -3
- package/docs/API/10-lang/10-common/10-createTransformer.ts +1 -1
- package/docs/API/10-lang/10-common/10-equal.ts +6 -0
- package/docs/API/10-lang/10-common/10-falsy.ts +19 -0
- package/docs/API/10-lang/10-common/10-instanceOf.ts +14 -3
- package/docs/API/10-lang/10-common/10-isType.ts +6 -0
- package/docs/API/10-lang/10-common/10-justExec.ts +3 -3
- package/docs/API/10-lang/10-common/10-or.ts +17 -3
- package/docs/API/10-lang/10-common/10-tap.ts +28 -0
- package/docs/API/10-lang/10-common/10-toJSON.ts +1 -1
- package/docs/API/10-lang/10-common/10-toNative.ts +1 -1
- package/docs/API/10-lang/10-common/10-toRegExp.ts +1 -1
- package/docs/API/10-lang/10-common/10-truthy.ts +19 -0
- package/docs/API/10-lang/10-common/10-whenNot.ts +44 -13
- package/docs/API/10-lang/10-common/index.llms.md +4 -0
- package/docs/API/10-lang/10-dataStructure/10-typeStructureIdentifier.ts +2 -2
- package/docs/API/10-lang/10-either/10-asyncGroup.ts +1 -1
- package/docs/API/10-lang/10-either/10-asyncSafeCallback.ts +4 -2
- package/docs/API/10-lang/10-either/10-extractErrorInLeft.ts +45 -0
- package/docs/API/10-lang/10-either/10-forwardAssertsSelection.ts +1 -1
- package/docs/API/10-lang/10-either/10-group.ts +1 -1
- package/docs/API/10-lang/10-either/10-hasInformation.ts +6 -0
- package/docs/API/10-lang/10-either/10-isLeft.ts +10 -1
- package/docs/API/10-lang/10-either/10-isRight.ts +10 -1
- package/docs/API/10-lang/10-either/10-isSelected.ts +13 -1
- package/docs/API/10-lang/10-either/10-keepAsRightSelection.ts +1 -1
- package/docs/API/10-lang/10-either/10-matchInformation.ts +7 -5
- package/docs/API/10-lang/10-either/10-matchInformationCombination.ts +61 -0
- package/docs/API/10-lang/10-either/10-matchInformationCombinationOtherwise.ts +62 -0
- package/docs/API/10-lang/10-either/10-matchInformationOtherwise.ts +7 -5
- package/docs/API/10-lang/10-either/10-rightAsyncPipe.ts +2 -1
- package/docs/API/10-lang/10-either/10-rightPipe.ts +1 -1
- package/docs/API/10-lang/10-either/10-safeCallback.ts +1 -1
- package/docs/API/10-lang/10-either/10-unwrapOr.ts +2 -2
- package/docs/API/10-lang/10-either/10-unwrapOtherwise.ts +2 -2
- package/docs/API/10-lang/10-either/10-whenHasInformation.ts +4 -3
- package/docs/API/10-lang/10-either/10-whenHasInformationOtherwise.ts +5 -5
- package/docs/API/10-lang/10-either/10-whenIsLeft.ts +2 -2
- package/docs/API/10-lang/10-either/10-whenIsLeftOtherwise.ts +5 -5
- package/docs/API/10-lang/10-either/10-whenIsRight.ts +2 -2
- package/docs/API/10-lang/10-either/10-whenIsRightOtherwise.ts +7 -7
- package/docs/API/10-lang/10-either/10-whenIsSelected.ts +5 -5
- package/docs/API/10-lang/10-either/10-whenIsSelectedOtherwise.ts +5 -5
- package/docs/API/10-lang/10-either/index.llms.md +12 -0
- package/docs/API/10-lang/10-generator/10-asyncConcat.ts +7 -10
- package/docs/API/10-lang/10-generator/10-asyncFlat.ts +6 -6
- package/docs/API/10-lang/10-generator/10-concat.ts +3 -3
- package/docs/API/10-lang/10-generator/10-flat.ts +2 -2
- package/docs/API/10-lang/10-generator/10-map.ts +1 -1
- package/docs/API/10-lang/10-generator/10-reduce.ts +1 -1
- package/docs/API/10-lang/10-number/10-betweenThan.ts +43 -0
- package/docs/API/10-lang/10-number/10-betweenThanOrEqual.ts +43 -0
- package/docs/API/10-lang/10-number/10-greaterThan.ts +35 -0
- package/docs/API/10-lang/10-number/10-greaterThanOrEqual.ts +35 -0
- package/docs/API/10-lang/10-number/10-isEven.ts +33 -0
- package/docs/API/10-lang/10-number/10-isInteger.ts +33 -0
- package/docs/API/10-lang/10-number/10-isMultipleOf.ts +35 -0
- package/docs/API/10-lang/10-number/10-isNegative.ts +33 -0
- package/docs/API/10-lang/10-number/10-isNotZero.ts +33 -0
- package/docs/API/10-lang/10-number/10-isOdd.ts +33 -0
- package/docs/API/10-lang/10-number/10-isPositive.ts +33 -0
- package/docs/API/10-lang/10-number/10-isSafe.ts +33 -0
- package/docs/API/10-lang/10-number/10-isStrictNegative.ts +34 -0
- package/docs/API/10-lang/10-number/10-isStrictPositive.ts +33 -0
- package/docs/API/10-lang/10-number/10-lessThan.ts +35 -0
- package/docs/API/10-lang/10-number/10-lessThanOrEqual.ts +35 -0
- package/docs/API/10-lang/10-number/10-max.ts +19 -0
- package/docs/API/10-lang/10-number/10-maxOf.ts +19 -0
- package/docs/API/10-lang/10-number/10-min.ts +19 -0
- package/docs/API/10-lang/10-number/10-minOf.ts +19 -0
- package/docs/API/10-lang/10-number/10-sort.ts +19 -0
- package/docs/API/10-lang/10-number/10-sum.ts +19 -0
- package/docs/API/10-lang/10-number/index.llms.md +92 -0
- package/docs/API/10-lang/10-number/index.md +3 -0
- package/docs/API/10-lang/10-object/10-assign.ts +41 -0
- package/docs/API/10-lang/10-object/10-countKeys.ts +15 -0
- package/docs/API/10-lang/10-object/10-deepDiscriminate.ts +63 -0
- package/docs/API/10-lang/10-object/10-deepOverride.ts +35 -0
- package/docs/API/10-lang/10-object/10-discriminate.ts +55 -0
- package/docs/API/10-lang/10-object/10-discriminateEntryKey.ts +43 -0
- package/docs/API/10-lang/10-object/10-discriminateEntryValue.ts +44 -0
- package/docs/API/10-lang/10-object/10-entries.ts +19 -0
- package/docs/API/10-lang/10-object/10-entry.ts +17 -0
- package/docs/API/10-lang/10-object/10-fromEntries.ts +23 -0
- package/docs/API/10-lang/10-object/10-getDeepProperty.ts +26 -0
- package/docs/API/10-lang/10-object/10-getProperty.ts +24 -0
- package/docs/API/10-lang/10-object/10-hasKeys.ts +43 -0
- package/docs/API/10-lang/10-object/10-isSimple.ts +38 -0
- package/docs/API/10-lang/10-object/10-keys.ts +19 -0
- package/docs/API/10-lang/10-object/10-omit.ts +39 -0
- package/docs/API/10-lang/10-object/10-override.ts +24 -0
- package/docs/API/10-lang/10-object/10-pick.ts +41 -0
- package/docs/API/10-lang/10-object/10-to.ts +40 -0
- package/docs/API/10-lang/10-object/10-transformProperties.ts +43 -0
- package/docs/API/10-lang/10-object/10-transformProperty.ts +39 -0
- package/docs/API/10-lang/10-object/10-values.ts +19 -0
- package/docs/API/10-lang/10-object/index.llms.md +92 -0
- package/docs/API/10-lang/10-object/index.md +3 -0
- package/docs/API/10-lang/10-path/10-computeRelative.ts +19 -0
- package/docs/API/10-lang/10-path/10-concatSegment.ts +28 -0
- package/docs/API/10-lang/10-path/10-create.ts +21 -0
- package/docs/API/10-lang/10-path/10-createAbsolute.ts +21 -0
- package/docs/API/10-lang/10-path/10-createAbsoluteOrThrow.ts +16 -0
- package/docs/API/10-lang/10-path/10-createMatcher.ts +50 -0
- package/docs/API/10-lang/10-path/10-createOrThrow.ts +16 -0
- package/docs/API/10-lang/10-path/10-createSegment.ts +26 -0
- package/docs/API/10-lang/10-path/10-createSegmentOrThrow.ts +16 -0
- package/docs/API/10-lang/10-path/10-declareAbsolutePath.ts +15 -0
- package/docs/API/10-lang/10-path/10-declarePath.ts +15 -0
- package/docs/API/10-lang/10-path/10-declareSegment.ts +15 -0
- package/docs/API/10-lang/10-path/10-getBaseName.ts +22 -0
- package/docs/API/10-lang/10-path/10-getExtensionName.ts +22 -0
- package/docs/API/10-lang/10-path/10-getParentFolderPath.ts +25 -0
- package/docs/API/10-lang/10-path/10-is.ts +46 -0
- package/docs/API/10-lang/10-path/10-isAbsolute.ts +46 -0
- package/docs/API/10-lang/10-path/10-isSegment.ts +42 -0
- package/docs/API/10-lang/10-path/10-normalize.ts +26 -0
- package/docs/API/10-lang/10-path/10-resolveFrom.ts +37 -0
- package/docs/API/10-lang/10-path/10-resolveRelative.ts +23 -0
- package/docs/API/10-lang/10-path/index.llms.md +88 -0
- package/docs/API/10-lang/10-path/index.md +3 -0
- package/docs/API/10-lang/10-pattern/10-exhaustive.ts +26 -0
- package/docs/API/10-lang/10-pattern/10-isMatch.ts +72 -0
- package/docs/API/10-lang/10-pattern/10-match.ts +133 -0
- package/docs/API/10-lang/10-pattern/10-matchWithEntity.ts +49 -0
- package/docs/API/10-lang/10-pattern/10-matchWithEntityOtherwise.ts +55 -0
- package/docs/API/10-lang/10-pattern/10-matchWithError.ts +45 -0
- package/docs/API/10-lang/10-pattern/10-matchWithErrorOtherwise.ts +48 -0
- package/docs/API/10-lang/10-pattern/10-matchWithFact.ts +49 -0
- package/docs/API/10-lang/10-pattern/10-matchWithFactOtherwise.ts +49 -0
- package/docs/API/10-lang/10-pattern/10-matchWithNumber.ts +33 -0
- package/docs/API/10-lang/10-pattern/10-matchWithNumberOtherwise.ts +37 -0
- package/docs/API/10-lang/10-pattern/10-matchWithString.ts +34 -0
- package/docs/API/10-lang/10-pattern/10-matchWithStringOtherwise.ts +35 -0
- package/docs/API/10-lang/10-pattern/10-matchWithTaggedObject.ts +43 -0
- package/docs/API/10-lang/10-pattern/10-matchWithTaggedObjectOtherwise.ts +49 -0
- package/docs/API/10-lang/10-pattern/10-otherwise.ts +28 -0
- package/docs/API/10-lang/10-pattern/10-union.ts +47 -0
- package/docs/API/10-lang/10-pattern/10-when.ts +46 -0
- package/docs/API/10-lang/10-pattern/10-whenNot.ts +123 -0
- package/docs/API/10-lang/10-pattern/index.llms.md +80 -0
- package/docs/API/10-lang/10-pattern/index.md +3 -0
- package/docs/API/10-lang/10-printer/10-bold.ts +12 -0
- package/docs/API/10-lang/10-printer/10-colorized.ts +18 -0
- package/docs/API/10-lang/10-printer/10-colorizedBold.ts +18 -0
- package/docs/API/10-lang/10-printer/10-indent.ts +20 -0
- package/docs/API/10-lang/10-printer/10-primitives.md +11 -0
- package/docs/API/10-lang/10-printer/10-render.ts +29 -0
- package/docs/API/10-lang/10-printer/10-renderLine.ts +12 -0
- package/docs/API/10-lang/10-printer/10-renderParagraph.ts +16 -0
- package/docs/API/10-lang/10-printer/index.llms.md +37 -0
- package/docs/API/10-lang/10-printer/index.md +3 -0
- package/docs/API/10-lang/10-string/10-at.ts +18 -0
- package/docs/API/10-lang/10-string/10-capitalize.ts +18 -0
- package/docs/API/10-lang/10-string/10-charAt.ts +18 -0
- package/docs/API/10-lang/10-string/10-concat.ts +18 -0
- package/docs/API/10-lang/10-string/10-endsWith.ts +33 -0
- package/docs/API/10-lang/10-string/10-extract.ts +18 -0
- package/docs/API/10-lang/10-string/10-extractAll.ts +18 -0
- package/docs/API/10-lang/10-string/10-first.ts +17 -0
- package/docs/API/10-lang/10-string/10-includes.ts +33 -0
- package/docs/API/10-lang/10-string/10-indexOf.ts +17 -0
- package/docs/API/10-lang/10-string/10-isComposedOf.ts +33 -0
- package/docs/API/10-lang/10-string/10-isEmail.ts +56 -0
- package/docs/API/10-lang/10-string/10-isIn.ts +34 -0
- package/docs/API/10-lang/10-string/10-isKeyof.ts +37 -0
- package/docs/API/10-lang/10-string/10-isNotEmpty.ts +32 -0
- package/docs/API/10-lang/10-string/10-isNumber.ts +32 -0
- package/docs/API/10-lang/10-string/10-isTrimmed.ts +33 -0
- package/docs/API/10-lang/10-string/10-isUrl.ts +31 -0
- package/docs/API/10-lang/10-string/10-isUuid.ts +31 -0
- package/docs/API/10-lang/10-string/10-join.ts +18 -0
- package/docs/API/10-lang/10-string/10-last.ts +17 -0
- package/docs/API/10-lang/10-string/10-lastIndexOf.ts +17 -0
- package/docs/API/10-lang/10-string/10-length.ts +18 -0
- package/docs/API/10-lang/10-string/10-lengthEqual.ts +33 -0
- package/docs/API/10-lang/10-string/10-maxCharacters.ts +33 -0
- package/docs/API/10-lang/10-string/10-minCharacters.ts +33 -0
- package/docs/API/10-lang/10-string/10-normalize.ts +17 -0
- package/docs/API/10-lang/10-string/10-padEnd.ts +17 -0
- package/docs/API/10-lang/10-string/10-padStart.ts +17 -0
- package/docs/API/10-lang/10-string/10-pop.ts +17 -0
- package/docs/API/10-lang/10-string/10-prepend.ts +17 -0
- package/docs/API/10-lang/10-string/10-repeat.ts +17 -0
- package/docs/API/10-lang/10-string/10-replace.ts +18 -0
- package/docs/API/10-lang/10-string/10-replaceAll.ts +17 -0
- package/docs/API/10-lang/10-string/10-search.ts +17 -0
- package/docs/API/10-lang/10-string/10-shift.ts +17 -0
- package/docs/API/10-lang/10-string/10-slice.ts +17 -0
- package/docs/API/10-lang/10-string/10-sort.ts +19 -0
- package/docs/API/10-lang/10-string/10-sortCompare.ts +17 -0
- package/docs/API/10-lang/10-string/10-split.ts +34 -0
- package/docs/API/10-lang/10-string/10-startsWith.ts +33 -0
- package/docs/API/10-lang/10-string/10-stringify.ts +11 -0
- package/docs/API/10-lang/10-string/10-substring.ts +17 -0
- package/docs/API/10-lang/10-string/10-test.ts +17 -0
- package/docs/API/10-lang/10-string/10-to.ts +11 -0
- package/docs/API/10-lang/10-string/10-toLowerCase.ts +17 -0
- package/docs/API/10-lang/10-string/10-toUpperCase.ts +17 -0
- package/docs/API/10-lang/10-string/10-trim.ts +17 -0
- package/docs/API/10-lang/10-string/10-trimEnd.ts +17 -0
- package/docs/API/10-lang/10-string/10-trimStart.ts +17 -0
- package/docs/API/10-lang/10-string/10-uncapitalize.ts +17 -0
- package/docs/API/10-lang/10-string/index.llms.md +208 -0
- package/docs/API/10-lang/10-string/index.md +3 -0
- package/docs/API/10-lang/10-tuple/10-from.ts +50 -0
- package/docs/API/10-lang/10-tuple/10-map.ts +37 -0
- package/docs/API/10-lang/10-tuple/index.llms.md +12 -0
- package/docs/API/10-lang/10-tuple/index.md +3 -0
- package/docs/API/40-json-web-token/10-tokenHandler/10-createTokenHandler.ts +160 -0
- package/docs/API/40-json-web-token/10-tokenHandler/index.llms.md +8 -0
- package/docs/API/40-json-web-token/10-tokenHandler/index.md +3 -0
- package/docs/API/40-json-web-token/20-signer/10-createHS256.ts +24 -0
- package/docs/API/40-json-web-token/20-signer/10-createHS512.ts +24 -0
- package/docs/API/40-json-web-token/20-signer/10-createRS256.ts +28 -0
- package/docs/API/40-json-web-token/20-signer/10-createRS512.ts +28 -0
- package/docs/API/40-json-web-token/20-signer/10-factory.ts +29 -0
- package/docs/API/40-json-web-token/20-signer/index.llms.md +24 -0
- package/docs/API/40-json-web-token/20-signer/index.md +3 -0
- package/docs/API/40-json-web-token/30-cipher/10-createRSAOAEP.ts +26 -0
- package/docs/API/40-json-web-token/30-cipher/10-createRSAOAEP256.ts +26 -0
- package/docs/API/40-json-web-token/30-cipher/10-factory.ts +29 -0
- package/docs/API/40-json-web-token/30-cipher/index.llms.md +16 -0
- package/docs/API/40-json-web-token/30-cipher/index.md +3 -0
- package/docs/API/40-json-web-token/40-utils/10-AES_GCM.decrypt.ts +17 -0
- package/docs/API/40-json-web-token/40-utils/10-AES_GCM.encrypt.ts +11 -0
- package/docs/API/40-json-web-token/40-utils/10-AES_GCM.generateInitializationVector.ts +9 -0
- package/docs/API/40-json-web-token/40-utils/10-HMAC.sign.ts +13 -0
- package/docs/API/40-json-web-token/40-utils/10-HMAC.verify.ts +11 -0
- package/docs/API/40-json-web-token/40-utils/10-RSA.sign.ts +14 -0
- package/docs/API/40-json-web-token/40-utils/10-RSA.verify.ts +13 -0
- package/docs/API/40-json-web-token/40-utils/10-RSA_OAEP.decrypt.ts +13 -0
- package/docs/API/40-json-web-token/40-utils/10-RSA_OAEP.encrypt.ts +10 -0
- package/docs/API/40-json-web-token/40-utils/10-decodeBase64.ts +9 -0
- package/docs/API/40-json-web-token/40-utils/10-decodeBase64Url.ts +9 -0
- package/docs/API/40-json-web-token/40-utils/10-decodeText.ts +9 -0
- package/docs/API/40-json-web-token/40-utils/10-encodeBase64.ts +9 -0
- package/docs/API/40-json-web-token/40-utils/10-encodeBase64Url.ts +9 -0
- package/docs/API/40-json-web-token/40-utils/10-encodeText.ts +9 -0
- package/docs/API/40-json-web-token/40-utils/10-isBase64Url.ts +11 -0
- package/docs/API/40-json-web-token/40-utils/10-jsonParse.ts +11 -0
- package/docs/API/40-json-web-token/40-utils/10-pemToBinary.ts +11 -0
- package/docs/API/40-json-web-token/40-utils/index.llms.md +76 -0
- package/docs/API/40-json-web-token/40-utils/index.md +3 -0
- package/docs/API/40-json-web-token/index.md +3 -0
- package/docs/API/50-form/10-vue/10-construction/10-createForm.ts +48 -0
- package/docs/API/50-form/10-vue/10-construction/10-createFormField.ts +66 -0
- package/docs/API/50-form/10-vue/10-construction/10-createGridTemplates.ts +39 -0
- package/docs/API/50-form/10-vue/10-construction/10-createInput.ts +46 -0
- package/docs/API/50-form/10-vue/10-construction/10-createTemplate.ts +36 -0
- package/docs/API/50-form/10-vue/10-construction/fixtures/AddressInput.vue +19 -0
- package/docs/API/50-form/10-vue/10-construction/index.llms.md +24 -0
- package/docs/API/50-form/10-vue/10-construction/index.md +3 -0
- package/docs/API/50-form/10-vue/20-layouts/10-useCheckLayout.ts +40 -0
- package/docs/API/50-form/10-vue/20-layouts/10-useDisabledLayout.ts +34 -0
- package/docs/API/50-form/10-vue/20-layouts/10-useMultiLayout.ts +32 -0
- package/docs/API/50-form/10-vue/20-layouts/10-useRepeatLayout.ts +34 -0
- package/docs/API/50-form/10-vue/20-layouts/10-useSectionLayout.ts +20 -0
- package/docs/API/50-form/10-vue/20-layouts/10-useSlotLayout.ts +37 -0
- package/docs/API/50-form/10-vue/20-layouts/10-useStepLayout.ts +31 -0
- package/docs/API/50-form/10-vue/20-layouts/10-useUnionLayout.ts +48 -0
- package/docs/API/50-form/10-vue/20-layouts/index.llms.md +36 -0
- package/docs/API/50-form/10-vue/20-layouts/index.md +3 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useCheckbox.ts +13 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useCheckboxPolicy.ts +18 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useDateInput.ts +20 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useDualRangeInput.ts +27 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useFileInput.ts +23 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useNumberInput.ts +18 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useRadioGroup.ts +31 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useRangeDateInput.ts +23 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useRangeInput.ts +18 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useRangeTimeInput.ts +23 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useSelectInput.ts +31 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useTextInput.ts +14 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useTextareaInput.ts +14 -0
- package/docs/API/50-form/10-vue/30-designSystem/10-useTimeInput.ts +20 -0
- package/docs/API/50-form/10-vue/30-designSystem/20-components.md +11 -0
- package/docs/API/50-form/10-vue/30-designSystem/index.llms.md +65 -0
- package/docs/API/50-form/10-vue/30-designSystem/index.md +3 -0
- package/docs/API/50-form/10-vue/fixtures/templates.ts +20 -0
- package/docs/API/50-form/10-vue/index.md +3 -0
- package/docs/API/50-form/index.md +3 -0
- package/docs/API/60-playwright/10-construction/10-createComponent.ts +47 -0
- package/docs/API/60-playwright/10-construction/10-createComponentInteraction.ts +28 -0
- package/docs/API/60-playwright/10-construction/10-createPage.ts +34 -0
- package/docs/API/60-playwright/10-construction/10-createStepWrapper.ts +23 -0
- package/docs/API/60-playwright/10-construction/10-createWebsite.ts +57 -0
- package/docs/API/60-playwright/10-construction/10-initClient.ts +38 -0
- package/docs/API/60-playwright/10-construction/index.llms.md +28 -0
- package/docs/API/60-playwright/10-construction/index.md +3 -0
- package/docs/API/60-playwright/20-actions/10-check.ts +9 -0
- package/docs/API/60-playwright/20-actions/10-clear.ts +9 -0
- package/docs/API/60-playwright/20-actions/10-click.ts +9 -0
- package/docs/API/60-playwright/20-actions/10-dragTo.ts +10 -0
- package/docs/API/60-playwright/20-actions/10-extractContent.ts +10 -0
- package/docs/API/60-playwright/20-actions/10-fill.ts +9 -0
- package/docs/API/60-playwright/20-actions/10-focus.ts +9 -0
- package/docs/API/60-playwright/20-actions/10-forceClick.ts +10 -0
- package/docs/API/60-playwright/20-actions/10-hover.ts +9 -0
- package/docs/API/60-playwright/20-actions/10-press.ts +9 -0
- package/docs/API/60-playwright/20-actions/10-selectOption.ts +10 -0
- package/docs/API/60-playwright/20-actions/10-type.ts +10 -0
- package/docs/API/60-playwright/20-actions/10-uncheck.ts +9 -0
- package/docs/API/60-playwright/20-actions/10-withStep.ts +10 -0
- package/docs/API/60-playwright/20-actions/index.llms.md +60 -0
- package/docs/API/60-playwright/20-actions/index.md +3 -0
- package/docs/API/60-playwright/30-assertions/10-toBeBusy.ts +10 -0
- package/docs/API/60-playwright/30-assertions/10-toBeChecked.ts +9 -0
- package/docs/API/60-playwright/30-assertions/10-toBeDisabled.ts +9 -0
- package/docs/API/60-playwright/30-assertions/10-toBeEnabled.ts +9 -0
- package/docs/API/60-playwright/30-assertions/10-toBeHidden.ts +9 -0
- package/docs/API/60-playwright/30-assertions/10-toBeNotBusy.ts +10 -0
- package/docs/API/60-playwright/30-assertions/10-toBeVisible.ts +10 -0
- package/docs/API/60-playwright/30-assertions/10-toContainText.ts +9 -0
- package/docs/API/60-playwright/30-assertions/10-toHaveAttribute.ts +12 -0
- package/docs/API/60-playwright/30-assertions/10-toHaveClass.ts +9 -0
- package/docs/API/60-playwright/30-assertions/10-toHaveNoText.ts +10 -0
- package/docs/API/60-playwright/30-assertions/10-toHaveQuantity.ts +20 -0
- package/docs/API/60-playwright/30-assertions/10-toHaveText.ts +9 -0
- package/docs/API/60-playwright/30-assertions/10-toHaveValue.ts +9 -0
- package/docs/API/60-playwright/30-assertions/10-withStep.ts +10 -0
- package/docs/API/60-playwright/30-assertions/index.llms.md +64 -0
- package/docs/API/60-playwright/30-assertions/index.md +3 -0
- package/docs/API/60-playwright/fixtures/component.ts +44 -0
- package/docs/API/60-playwright/index.md +3 -0
- package/docs/API.llms.md +84 -0
- package/docs/concepts/01-fundamental/01-constraint/20-manipulation.ts +9 -6
- package/docs/concepts/01-fundamental/01-constraint/30-cast.ts +9 -5
- package/docs/concepts/01-fundamental/02-currying/01-use.ts +5 -0
- package/docs/concepts/01-fundamental/02-currying/10-built-in-function.ts +28 -16
- package/docs/concepts/01-fundamental/02-currying/20-inner-pipe.ts +11 -2
- package/docs/concepts/01-fundamental/02-currying/30-async-pipe.ts +11 -2
- package/docs/concepts/01-fundamental/03-either/10-discrimination.ts +23 -12
- package/docs/concepts/01-fundamental/03-either/20-exhaustive-handling.ts +27 -10
- package/docs/concepts/01-fundamental/03-either/30-composition.ts +18 -10
- package/docs/concepts/01-fundamental/03-either/40-result-adaptation.ts +10 -4
- package/docs/concepts/01-fundamental/03-either/50-external-results.ts +16 -3
- package/docs/concepts/01-fundamental/04-data-structure/10-structure.ts +110 -59
- package/docs/concepts/01-fundamental/04-data-structure/20-constraint.ts +20 -12
- package/docs/concepts/01-fundamental/04-data-structure/30-validation.ts +13 -9
- package/docs/concepts/01-fundamental/04-data-structure/40-codecs.ts +31 -20
- package/docs/concepts/01-fundamental/04-data-structure/50-recursive.ts +10 -1
- package/docs/concepts/01-fundamental/05-chrono/10-creation.ts +39 -13
- package/docs/concepts/01-fundamental/05-chrono/20-manipulation.ts +20 -4
- package/docs/concepts/01-fundamental/05-chrono/30-serialized.ts +22 -6
- package/docs/concepts/01-fundamental/05-chrono/40-timezone.ts +5 -1
- package/docs/concepts/01-fundamental/06-modeling/20-entity.ts +29 -42
- package/docs/concepts/01-fundamental/06-modeling/30-tagged-object.ts +46 -23
- package/docs/concepts/01-fundamental/06-modeling/40-entity-lifecycle.ts +30 -33
- package/docs/concepts/01-fundamental/07-discrimination/10-entity.ts +52 -20
- package/docs/concepts/01-fundamental/07-discrimination/20-fact.ts +54 -38
- package/docs/concepts/01-fundamental/07-discrimination/30-tagged-object.ts +52 -20
- package/docs/concepts/01-fundamental/07-discrimination/40-error.ts +26 -10
- package/docs/concepts/01-fundamental/07-discrimination/50-literal.ts +29 -10
- package/docs/concepts/01-fundamental/07-discrimination/60-shape.ts +10 -2
- package/docs/concepts/01-fundamental/07-discrimination/70-predicate.ts +18 -6
- package/docs/concepts/01-fundamental/08-kind/01-identity.md +7 -0
- package/docs/concepts/01-fundamental/08-kind/20-metadata.md +11 -0
- package/docs/concepts/01-fundamental/08-kind/30-transport.md +11 -0
- package/docs/concepts/01-fundamental/08-kind/index.md +3 -0
- package/docs/concepts/02-server/10-file/10-manipulation.ts +15 -3
- package/docs/concepts/02-server/10-file/20-path.ts +22 -6
- package/docs/concepts/02-server/20-http/10-init.ts +1 -9
- package/docs/concepts/02-server/20-http/20-route.ts +40 -32
- package/docs/concepts/02-server/20-http/30-routine.ts +12 -19
- package/docs/concepts/02-server/20-http/40-jwt.ts +49 -37
- package/docs/concepts/02-server/20-http/50-open-api.ts +44 -0
- package/docs/concepts/02-server/20-http/index.md +1 -1
- package/docs/concepts/02-server/30-environment/10-platform.ts +12 -3
- package/docs/concepts/02-server/30-environment/20-variable.ts +13 -7
- package/docs/concepts/03-client/10-http/10-init.ts +11 -23
- package/docs/concepts/03-client/10-http/20-request.ts +79 -69
- package/docs/concepts/03-client/10-http/30-hook.ts +23 -23
- package/docs/concepts/03-client/20-form/10-init.ts +18 -15
- package/docs/concepts/03-client/20-form/20-input.ts +13 -6
- package/docs/concepts/03-client/20-form/30-layout.ts +44 -49
- package/docs/concepts/03-client/20-form/40-template.ts +10 -5
- package/docs/concepts/03-client/20-form/50-integration.md +11 -0
- package/docs/concepts/03-client/20-form/examples/postModeration/ThePage.vue +32 -0
- package/docs/concepts/03-client/20-form/examples/postModeration/usePostModeration.ts +80 -0
- package/docs/concepts/05-type-driven-design/01-architecture/10-boundaries.md +23 -20
- package/docs/concepts/05-type-driven-design/01-architecture/index.md +1 -1
- package/docs/concepts/05-type-driven-design/02-domains/10-entities.md +29 -37
- package/docs/concepts/05-type-driven-design/02-domains/20-aggregates.md +42 -26
- package/docs/concepts/05-type-driven-design/02-domains/30-repositories.md +20 -26
- package/docs/concepts/05-type-driven-design/02-domains/40-refinements.md +30 -0
- package/docs/concepts/05-type-driven-design/02-domains/index.md +1 -1
- package/docs/concepts/05-type-driven-design/03-applications/10-use-case.md +33 -40
- package/docs/concepts/05-type-driven-design/03-applications/20-ports.md +49 -0
- package/docs/concepts/05-type-driven-design/03-applications/index.md +1 -1
- package/docs/concepts/05-type-driven-design/04-infrastructure/10-implementation.md +27 -36
- package/docs/concepts/05-type-driven-design/04-infrastructure/index.md +1 -1
- package/docs/concepts/05-type-driven-design/fixtures/business/applications/ports/index.ts +1 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/applications/ports/waitingListEntry.ts +17 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/applications/useCases/clientGiveBackBook.ts +30 -12
- package/docs/concepts/05-type-driven-design/fixtures/business/applications/useCases/clientRentBook.ts +9 -8
- package/docs/concepts/05-type-driven-design/fixtures/business/applications/useCases/createBook.ts +7 -7
- package/docs/concepts/05-type-driven-design/fixtures/business/applications/useCases/index.ts +2 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/applications/useCases/withdrawBook.ts +32 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/aggregates/clientGiveBackBook.ts +72 -13
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/aggregates/clientRentBook.ts +37 -11
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/aggregates/createBook.ts +29 -17
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/aggregates/index.ts +1 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/aggregates/withdrawBook.ts +37 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/book/facts/create.ts +4 -5
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/book/facts/index.ts +2 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/book/facts/rental.ts +9 -9
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/book/facts/reserve.ts +37 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/book/facts/returnBook.ts +11 -9
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/book/facts/withdraw.ts +21 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/book/index.ts +42 -11
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/client/facts/giveBackBook.ts +11 -9
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/client/facts/rentBook.ts +10 -10
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/client/index.ts +6 -29
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/index.ts +1 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/waitingListEntry/facts/cancel.ts +26 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/waitingListEntry/facts/create.ts +33 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/waitingListEntry/facts/index.ts +3 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/waitingListEntry/facts/prepare.ts +23 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/entities/waitingListEntry/index.ts +79 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/index.ts +1 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/refinements/index.ts +1 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/refinements/refineLinkBetweenClientAndBorrowedBook.ts +34 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/repositories/book.ts +1 -1
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/repositories/index.ts +1 -0
- package/docs/concepts/05-type-driven-design/fixtures/business/domains/repositories/waitingListEntry.ts +19 -0
- package/docs/concepts/05-type-driven-design/fixtures/infrastructure/command/clientRentBook.ts +3 -3
- package/docs/concepts/05-type-driven-design/fixtures/infrastructure/http/checkers/bookExist.ts +2 -2
- package/docs/concepts/05-type-driven-design/fixtures/infrastructure/http/checkers/clientExist.ts +2 -2
- package/docs/concepts/05-type-driven-design/fixtures/infrastructure/http/routes/clientGiveBackBook.ts +23 -14
- package/docs/concepts/05-type-driven-design/fixtures/infrastructure/http/routes/clientRentBook.ts +7 -12
- package/docs/concepts/05-type-driven-design/fixtures/infrastructure/ports/book.ts +1 -1
- package/docs/concepts/05-type-driven-design/fixtures/infrastructure/ports/index.ts +1 -0
- package/docs/concepts/05-type-driven-design/fixtures/infrastructure/ports/waitingListEntry.ts +17 -0
- package/docs/concepts/05-type-driven-design/fixtures/infrastructure/useCases/index.ts +2 -1
- package/docs/concepts/05-type-driven-design/index.md +2 -2
- package/docs/concepts.llms.md +71 -25
- package/instructions/coding-conventions.md +2 -2
- package/package.json +17 -14
- package/skills/http-client/SKILL.md +1 -1
- package/skills/http-client/references/configuration.md +3 -1
- package/skills/http-client/references/examples/client-expectations.ts +11 -10
- package/skills/http-client/references/examples/client-streams.ts +2 -2
- package/skills/http-client/references/examples/external-client.ts +2 -2
- package/skills/http-client/references/responses.md +1 -1
- package/skills/http-server/SKILL.md +4 -9
- package/skills/http-server/references/examples/authentication.ts +2 -2
- package/skills/http-server/references/examples/inferred-client.ts +54 -0
- package/skills/http-server/references/examples/minimal-route.ts +2 -3
- package/skills/http-server/references/examples/protected-route.ts +4 -6
- package/skills/http-server/references/examples/rename-user-route.ts +4 -6
- package/skills/http-server/references/examples/user-checker.ts +2 -2
- package/skills/http-server/references/examples/user-route.ts +12 -5
- package/skills/http-server/references/initialization.md +1 -1
- package/skills/http-server/references/reusable-flows.md +3 -3
- package/skills/http-server/references/routes-and-floor.md +11 -3
- package/dist/bin/install/index.d.ts +0 -2
- package/docs/concepts/02-server/20-http/50-codegen.ts +0 -29
- package/skills/http-server/references/code-generation.md +0 -31
- package/skills/http-server/references/examples/generate-sdk.ts +0 -36
- /package/dist/bin/{install → installSkill}/skill.d.ts +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as DModeling from "@duplojs/lang/modeling";
|
|
2
|
+
import * as DCommon from "@duplojs/lang/common";
|
|
3
|
+
import { WaitingListEntry } from "..";
|
|
4
|
+
|
|
5
|
+
export const CancelWaitingListEntryFact = DModeling.createFact<
|
|
6
|
+
"CancelWaitingListEntry",
|
|
7
|
+
WaitingListEntry.CancelledState,
|
|
8
|
+
typeof WaitingListEntry.Entity
|
|
9
|
+
>("CancelWaitingListEntry")(
|
|
10
|
+
({ applyFact }) => (
|
|
11
|
+
params: {
|
|
12
|
+
waitingListEntry: WaitingListEntry.Entity & (WaitingListEntry.PendingFlag | WaitingListEntry.ReadyFlag);
|
|
13
|
+
reason: WaitingListEntry.CancelledState["reason"];
|
|
14
|
+
},
|
|
15
|
+
) => {
|
|
16
|
+
const state = WaitingListEntry.CancelledState.new({ reason: params.reason });
|
|
17
|
+
|
|
18
|
+
return DCommon.pipe(
|
|
19
|
+
params.waitingListEntry,
|
|
20
|
+
WaitingListEntry.Entity.update({ state }),
|
|
21
|
+
WaitingListEntry.CancelledFlag.append(state),
|
|
22
|
+
applyFact(state),
|
|
23
|
+
);
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
export type CancelWaitingListEntryFact = DModeling.GetFact<typeof CancelWaitingListEntryFact>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as DModeling from "@duplojs/lang/modeling";
|
|
2
|
+
import * as DCommon from "@duplojs/lang/common";
|
|
3
|
+
import { WaitingListEntry } from "..";
|
|
4
|
+
import { type Book } from "../../book";
|
|
5
|
+
import { type Client } from "../../client";
|
|
6
|
+
|
|
7
|
+
export const CreateWaitingListEntryFact = DModeling.createFact<
|
|
8
|
+
"CreateWaitingListEntry",
|
|
9
|
+
WaitingListEntry.PendingState,
|
|
10
|
+
typeof WaitingListEntry.Entity
|
|
11
|
+
>("CreateWaitingListEntry")(
|
|
12
|
+
({ applyFact }) => (params: {
|
|
13
|
+
id: WaitingListEntry.Id;
|
|
14
|
+
book: Book.Entity & (Book.AvailableFlag | Book.BorrowedFlag | Book.ReservedFlag);
|
|
15
|
+
client: Client.Entity;
|
|
16
|
+
requestedAt: WaitingListEntry.RequestedAt;
|
|
17
|
+
}) => {
|
|
18
|
+
const state = WaitingListEntry.PendingState.new({});
|
|
19
|
+
|
|
20
|
+
return DCommon.pipe(
|
|
21
|
+
WaitingListEntry.Entity.new({
|
|
22
|
+
id: params.id,
|
|
23
|
+
bookId: params.book.id,
|
|
24
|
+
clientId: params.client.id,
|
|
25
|
+
requestedAt: params.requestedAt,
|
|
26
|
+
state,
|
|
27
|
+
}),
|
|
28
|
+
WaitingListEntry.PendingFlag.append(state),
|
|
29
|
+
applyFact(state),
|
|
30
|
+
);
|
|
31
|
+
},
|
|
32
|
+
);
|
|
33
|
+
export type CreateWaitingListEntryFact = DModeling.GetFact<typeof CreateWaitingListEntryFact>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as DModeling from "@duplojs/lang/modeling";
|
|
2
|
+
import * as DCommon from "@duplojs/lang/common";
|
|
3
|
+
import { WaitingListEntry } from "..";
|
|
4
|
+
|
|
5
|
+
export const PrepareWaitingListEntryFact = DModeling.createFact<
|
|
6
|
+
"PrepareWaitingListEntry",
|
|
7
|
+
WaitingListEntry.ReadyState,
|
|
8
|
+
typeof WaitingListEntry.Entity
|
|
9
|
+
>("PrepareWaitingListEntry")(
|
|
10
|
+
({ applyFact }) => (
|
|
11
|
+
waitingListEntry: WaitingListEntry.Entity & WaitingListEntry.PendingFlag,
|
|
12
|
+
) => {
|
|
13
|
+
const state = WaitingListEntry.ReadyState.new({});
|
|
14
|
+
|
|
15
|
+
return DCommon.pipe(
|
|
16
|
+
waitingListEntry,
|
|
17
|
+
WaitingListEntry.Entity.update({ state }),
|
|
18
|
+
WaitingListEntry.ReadyFlag.append(state),
|
|
19
|
+
applyFact(state),
|
|
20
|
+
);
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
export type PrepareWaitingListEntryFact = DModeling.GetFact<typeof PrepareWaitingListEntryFact>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
2
|
+
import * as DModeling from "@duplojs/lang/modeling";
|
|
3
|
+
import * as DPattern from "@duplojs/lang/pattern";
|
|
4
|
+
import * as DEither from "@duplojs/lang/either";
|
|
5
|
+
import { Book } from "../book";
|
|
6
|
+
import { Client } from "../client";
|
|
7
|
+
import { type CreateWaitingListEntryFact, type PrepareWaitingListEntryFact, type CancelWaitingListEntryFact } from "./facts";
|
|
8
|
+
|
|
9
|
+
export * from "./facts";
|
|
10
|
+
|
|
11
|
+
export namespace WaitingListEntry {
|
|
12
|
+
const namespace = DModeling.createEntityNamespace("WaitingListEntry");
|
|
13
|
+
|
|
14
|
+
export const Id = namespace.createNewType("Id", DDataStructure.string(), [DDataStructure.uuid()]);
|
|
15
|
+
export type Id = DDataStructure.StructureValue<typeof Id>;
|
|
16
|
+
|
|
17
|
+
export const RequestedAt = namespace.createNewType("RequestedAt", DDataStructure.date());
|
|
18
|
+
export type RequestedAt = DDataStructure.StructureValue<typeof RequestedAt>;
|
|
19
|
+
|
|
20
|
+
export const PendingState = DModeling.createTaggedObject("PendingWaitingListEntryState", {});
|
|
21
|
+
export type PendingState = DDataStructure.StructureValue<typeof PendingState>;
|
|
22
|
+
|
|
23
|
+
export const ReadyState = DModeling.createTaggedObject("ReadyWaitingListEntryState", {});
|
|
24
|
+
export type ReadyState = DDataStructure.StructureValue<typeof ReadyState>;
|
|
25
|
+
|
|
26
|
+
export const CancelledState = DModeling.createTaggedObject("CancelledWaitingListEntryState", {
|
|
27
|
+
reason: DDataStructure.literal(["book-withdrawn", "client-cancelled"]),
|
|
28
|
+
});
|
|
29
|
+
export type CancelledState = DDataStructure.StructureValue<typeof CancelledState>;
|
|
30
|
+
|
|
31
|
+
export const Entity = namespace.createEntity(() => ({
|
|
32
|
+
id: Id,
|
|
33
|
+
bookId: Book.Id,
|
|
34
|
+
clientId: Client.Id,
|
|
35
|
+
requestedAt: RequestedAt,
|
|
36
|
+
state: DDataStructure.union([PendingState, ReadyState, CancelledState]),
|
|
37
|
+
}));
|
|
38
|
+
export type Entity = DDataStructure.StructureValue<typeof Entity>;
|
|
39
|
+
|
|
40
|
+
export type Facts = CreateWaitingListEntryFact | PrepareWaitingListEntryFact | CancelWaitingListEntryFact;
|
|
41
|
+
|
|
42
|
+
export const PendingFlag = DModeling.createFlag<
|
|
43
|
+
"PendingWaitingListEntry",
|
|
44
|
+
PendingState,
|
|
45
|
+
typeof Entity
|
|
46
|
+
>("PendingWaitingListEntry");
|
|
47
|
+
export type PendingFlag = DModeling.GetFlag<typeof PendingFlag>;
|
|
48
|
+
|
|
49
|
+
export const ReadyFlag = DModeling.createFlag<
|
|
50
|
+
"ReadyWaitingListEntry",
|
|
51
|
+
ReadyState,
|
|
52
|
+
typeof Entity
|
|
53
|
+
>("ReadyWaitingListEntry");
|
|
54
|
+
export type ReadyFlag = DModeling.GetFlag<typeof ReadyFlag>;
|
|
55
|
+
|
|
56
|
+
export const CancelledFlag = DModeling.createFlag<
|
|
57
|
+
"CancelledWaitingListEntry",
|
|
58
|
+
CancelledState,
|
|
59
|
+
typeof Entity
|
|
60
|
+
>("CancelledWaitingListEntry");
|
|
61
|
+
export type CancelledFlag = DModeling.GetFlag<typeof CancelledFlag>;
|
|
62
|
+
|
|
63
|
+
export function refineState<GenericEntity extends Entity>(waitingListEntry: GenericEntity) {
|
|
64
|
+
return DPattern.matchWithTaggedObject(waitingListEntry.state, {
|
|
65
|
+
PendingWaitingListEntryState: (state) => DEither.result(
|
|
66
|
+
"PendingWaitingListEntry",
|
|
67
|
+
PendingFlag.append(waitingListEntry, state),
|
|
68
|
+
),
|
|
69
|
+
ReadyWaitingListEntryState: (state) => DEither.result(
|
|
70
|
+
"ReadyWaitingListEntry",
|
|
71
|
+
ReadyFlag.append(waitingListEntry, state),
|
|
72
|
+
),
|
|
73
|
+
CancelledWaitingListEntryState: (state) => DEither.result(
|
|
74
|
+
"CancelledWaitingListEntry",
|
|
75
|
+
CancelledFlag.append(waitingListEntry, state),
|
|
76
|
+
),
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./refineLinkBetweenClientAndBorrowedBook";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as DCommon from "@duplojs/lang/common";
|
|
2
|
+
import * as DArray from "@duplojs/lang/array";
|
|
3
|
+
import { Book, type Client } from "../entities";
|
|
4
|
+
import * as DInvocation from "@duplojs/lang/invocation";
|
|
5
|
+
|
|
6
|
+
export function refineLinkBetweenClientAndBorrowedBook(
|
|
7
|
+
client: Client.Entity,
|
|
8
|
+
book: Book.Entity & Book.BorrowedFlag,
|
|
9
|
+
) {
|
|
10
|
+
if (
|
|
11
|
+
DArray.includes(client.borrowedBooks, book.id)
|
|
12
|
+
&& client.id === Book.BorrowedFlag.getPayload(book).currentBorrowerId
|
|
13
|
+
) {
|
|
14
|
+
return DCommon.pipe(
|
|
15
|
+
{
|
|
16
|
+
client,
|
|
17
|
+
book,
|
|
18
|
+
},
|
|
19
|
+
DInvocation.evidenceResult(
|
|
20
|
+
"client-with-borrowed-book",
|
|
21
|
+
),
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return DCommon.pipe(
|
|
26
|
+
{
|
|
27
|
+
client,
|
|
28
|
+
book,
|
|
29
|
+
},
|
|
30
|
+
DInvocation.evidenceResult(
|
|
31
|
+
"client-and-book-without-link",
|
|
32
|
+
),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -10,7 +10,7 @@ export interface BookRepository {
|
|
|
10
10
|
>;
|
|
11
11
|
rankAvailability: DInvocation.SignedFunction<
|
|
12
12
|
"rankAvailability",
|
|
13
|
-
(
|
|
13
|
+
(book: Book.Entity) => Promise<void>
|
|
14
14
|
>;
|
|
15
15
|
findById(id: Book.Id): Promise<DEither.Maybe<Book.Entity>>;
|
|
16
16
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as DInvocation from "@duplojs/lang/invocation";
|
|
2
|
+
import { type Book, type WaitingListEntry } from "../entities";
|
|
3
|
+
|
|
4
|
+
export interface WaitingListEntryRepository {
|
|
5
|
+
findNextPendingForBook(book: Book.Entity & Book.AvailableFlag): Promise<
|
|
6
|
+
| DInvocation.EvidenceResult<"next-pending-waiting-list-entry", {
|
|
7
|
+
book: Book.Entity & Book.AvailableFlag;
|
|
8
|
+
waitingListEntry: WaitingListEntry.Entity & WaitingListEntry.PendingFlag;
|
|
9
|
+
}>
|
|
10
|
+
| DInvocation.EvidenceResult<"no-pending-waiting-list-entry", {
|
|
11
|
+
book: Book.Entity & Book.AvailableFlag;
|
|
12
|
+
waitingListEntry: null;
|
|
13
|
+
}>
|
|
14
|
+
>;
|
|
15
|
+
findAllActiveByBook(book: Book.Entity & Book.WithdrawnFlag): AsyncGenerator<{
|
|
16
|
+
book: Book.Entity & Book.WithdrawnFlag;
|
|
17
|
+
waitingListEntry: WaitingListEntry.Entity & (WaitingListEntry.PendingFlag | WaitingListEntry.ReadyFlag);
|
|
18
|
+
} & DInvocation.Evidence<"active-waiting-list-entry-for-withdrawn-book">>;
|
|
19
|
+
}
|
package/docs/concepts/05-type-driven-design/fixtures/infrastructure/command/clientRentBook.ts
CHANGED
|
@@ -43,6 +43,8 @@ export const clientRentBookCommand = DSCommand.create(
|
|
|
43
43
|
"book.notfound": true,
|
|
44
44
|
"client.notfound": true,
|
|
45
45
|
BorrowedState: true,
|
|
46
|
+
ReservedState: true,
|
|
47
|
+
WithdrawnState: true,
|
|
46
48
|
NoBookRentalSlotsAvailable: true,
|
|
47
49
|
success: false,
|
|
48
50
|
})
|
|
@@ -51,12 +53,10 @@ export const clientRentBookCommand = DSCommand.create(
|
|
|
51
53
|
return;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
await DCommon.pipe(
|
|
55
57
|
inputResult,
|
|
56
58
|
DEither.unwrapRight,
|
|
57
59
|
useCases.clientRentBookUseCase,
|
|
58
60
|
);
|
|
59
|
-
|
|
60
|
-
console.log(JSON.stringify(result));
|
|
61
61
|
},
|
|
62
62
|
);
|
package/docs/concepts/05-type-driven-design/fixtures/infrastructure/http/checkers/bookExist.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createPresetChecker,
|
|
1
|
+
import { createPresetChecker, useCheckerBuilder } from "@duplojs/http";
|
|
2
2
|
import * as DEither from "@duplojs/lang/either";
|
|
3
3
|
import { type Book } from "../../../business/domains";
|
|
4
4
|
import { bookRepository } from "../../ports";
|
|
@@ -15,5 +15,5 @@ export const bookExist = useCheckerBuilder()
|
|
|
15
15
|
|
|
16
16
|
export const iWantBookExist = createPresetChecker(bookExist, {
|
|
17
17
|
result: "book.find",
|
|
18
|
-
otherwise:
|
|
18
|
+
otherwise: ({ response }) => response.notFound("book.notfound"),
|
|
19
19
|
});
|
package/docs/concepts/05-type-driven-design/fixtures/infrastructure/http/checkers/clientExist.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createPresetChecker,
|
|
1
|
+
import { createPresetChecker, useCheckerBuilder } from "@duplojs/http";
|
|
2
2
|
import * as DEither from "@duplojs/lang/either";
|
|
3
3
|
import { type Client } from "../../../business/domains";
|
|
4
4
|
import { clientRepository } from "../../ports";
|
|
@@ -15,5 +15,5 @@ export const clientExist = useCheckerBuilder()
|
|
|
15
15
|
|
|
16
16
|
export const iWantClientExist = createPresetChecker(clientExist, {
|
|
17
17
|
result: "client.find",
|
|
18
|
-
otherwise:
|
|
18
|
+
otherwise: ({ response }) => response.notFound("client.notfound"),
|
|
19
19
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
1
|
+
import { useRouteBuilder } from "@duplojs/http";
|
|
3
2
|
import * as DEither from "@duplojs/lang/either";
|
|
4
|
-
import { Book, Client } from "../../../business/domains";
|
|
3
|
+
import { Book, Client, refineLinkBetweenClientAndBorrowedBook } from "../../../business/domains";
|
|
5
4
|
import { useCases } from "../../useCases";
|
|
6
5
|
import { iWantBookExist, iWantClientExist } from "../checkers";
|
|
7
6
|
|
|
@@ -15,23 +14,33 @@ export const clientGiveBackBookRoute = useRouteBuilder("POST", "/book-rentals/re
|
|
|
15
14
|
.presetCheck(iWantClientExist.indexing("client"), ({ clientId }) => clientId)
|
|
16
15
|
.presetCheck(iWantBookExist.indexing("book"), ({ bookId }) => bookId)
|
|
17
16
|
.cut(
|
|
18
|
-
|
|
17
|
+
({ book }, { response, output }) => DEither.matchInformation(
|
|
18
|
+
Book.refineState(book),
|
|
19
|
+
{
|
|
20
|
+
BorrowedState: (book) => output({ book }),
|
|
21
|
+
AvailableState: () => response.conflict("book.notBorrowed"),
|
|
22
|
+
ReservedState: () => response.conflict("book.notBorrowed"),
|
|
23
|
+
WithdrawnState: () => response.conflict("book.notBorrowed"),
|
|
24
|
+
},
|
|
25
|
+
),
|
|
26
|
+
)
|
|
27
|
+
.cut(
|
|
19
28
|
({ client, book }, { response, output }) => DEither.matchInformation(
|
|
20
|
-
|
|
29
|
+
refineLinkBetweenClientAndBorrowedBook(client, book),
|
|
21
30
|
{
|
|
22
|
-
"client-
|
|
23
|
-
"client-
|
|
31
|
+
"client-with-borrowed-book": (clientWithBorrowedBook) => output({ clientWithBorrowedBook }),
|
|
32
|
+
"client-and-book-without-link": () => response.conflict("client.notHaveBook"),
|
|
24
33
|
},
|
|
25
34
|
),
|
|
26
35
|
)
|
|
27
36
|
.handler(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
book: Book.Entity,
|
|
31
|
-
})),
|
|
32
|
-
async({ client }, { response }) => {
|
|
33
|
-
const result = await useCases.clientGiveBackBookUseCase({ client });
|
|
37
|
+
async({ clientWithBorrowedBook }, { response }) => {
|
|
38
|
+
const result = await useCases.clientGiveBackBookUseCase(clientWithBorrowedBook);
|
|
34
39
|
|
|
35
|
-
return
|
|
40
|
+
return DEither.matchInformation(result, {
|
|
41
|
+
"book-returned-without-waiting-list-entry": () => response.ok("book.returned", null),
|
|
42
|
+
"book-returned-and-reserved": () => response.ok("book.returnedAndReserved", null),
|
|
43
|
+
"waiting-list-selection-unavailable": () => response.serviceUnavailable("waiting-list.selectionUnavailable"),
|
|
44
|
+
});
|
|
36
45
|
},
|
|
37
46
|
);
|
package/docs/concepts/05-type-driven-design/fixtures/infrastructure/http/routes/clientRentBook.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as DDataStructure from "@duplojs/lang/dataStructure";
|
|
1
|
+
import { useRouteBuilder } from "@duplojs/http";
|
|
3
2
|
import * as DEither from "@duplojs/lang/either";
|
|
4
3
|
import { Book, Client } from "../../../business/domains";
|
|
5
4
|
import { useCases } from "../../useCases";
|
|
@@ -15,36 +14,32 @@ export const clientRentBookRoute = useRouteBuilder("POST", "/book-rentals")
|
|
|
15
14
|
.presetCheck(iWantClientExist.indexing("client"), ({ clientId }) => clientId)
|
|
16
15
|
.presetCheck(iWantBookExist.indexing("book"), ({ bookId }) => bookId)
|
|
17
16
|
.cut(
|
|
18
|
-
ResponseContract.conflict("client.noBookRentalSlotsAvailable"),
|
|
19
17
|
({ client }, { response, output }) => DEither.matchInformation(
|
|
20
18
|
Client.canRentBook(client),
|
|
21
19
|
{
|
|
22
20
|
CanRentBook: (client) => output({ client }),
|
|
23
|
-
NoBookRentalSlotsAvailable: () => response("client.noBookRentalSlotsAvailable"),
|
|
21
|
+
NoBookRentalSlotsAvailable: () => response.conflict("client.noBookRentalSlotsAvailable"),
|
|
24
22
|
},
|
|
25
23
|
),
|
|
26
24
|
)
|
|
27
25
|
.cut(
|
|
28
|
-
ResponseContract.conflict("book.unavailable"),
|
|
29
26
|
({ book }, { response, output }) => DEither.matchInformation(
|
|
30
27
|
Book.refineState(book),
|
|
31
28
|
{
|
|
32
29
|
AvailableState: (book) => output({ book }),
|
|
33
|
-
BorrowedState: () => response("book.unavailable"),
|
|
30
|
+
BorrowedState: () => response.conflict("book.unavailable"),
|
|
31
|
+
ReservedState: () => response.conflict("book.unavailable"),
|
|
32
|
+
WithdrawnState: () => response.conflict("book.unavailable"),
|
|
34
33
|
},
|
|
35
34
|
),
|
|
36
35
|
)
|
|
37
36
|
.handler(
|
|
38
|
-
ResponseContract.created("book.rented", DDataStructure.object({
|
|
39
|
-
client: Client.Entity,
|
|
40
|
-
book: Book.Entity,
|
|
41
|
-
})),
|
|
42
37
|
async({ client, book }, { response }) => {
|
|
43
|
-
|
|
38
|
+
await useCases.clientRentBookUseCase({
|
|
44
39
|
client,
|
|
45
40
|
book,
|
|
46
41
|
});
|
|
47
42
|
|
|
48
|
-
return response("book.rented"
|
|
43
|
+
return response.created("book.rented");
|
|
49
44
|
},
|
|
50
45
|
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as DInvocation from "@duplojs/lang/invocation";
|
|
2
|
+
import * as DGenerator from "@duplojs/lang/generator";
|
|
3
|
+
import { WaitingListEntryRepositoryPort } from "../../business/applications/ports";
|
|
4
|
+
import * as DEither from "@duplojs/lang/either";
|
|
5
|
+
|
|
6
|
+
export const waitingListEntryRepository = WaitingListEntryRepositoryPort.createImplementation({
|
|
7
|
+
findNextPendingForBook: (book) => Promise.resolve(
|
|
8
|
+
DInvocation.evidenceResult("no-pending-waiting-list-entry", {
|
|
9
|
+
book,
|
|
10
|
+
waitingListEntry: null,
|
|
11
|
+
}),
|
|
12
|
+
),
|
|
13
|
+
findAllActiveByBook: DInvocation.withAdditionalResult((book) => true
|
|
14
|
+
? DGenerator.asyncLoop(({ exit }) => exit())
|
|
15
|
+
: Promise.resolve(DEither.left("waiting-list-stream-unavailable", book.id))),
|
|
16
|
+
save: (entity) => Promise.resolve(entity),
|
|
17
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as DInvocation from "@duplojs/lang/invocation";
|
|
2
2
|
import * as UseCases from "../../business/applications/useCases";
|
|
3
|
-
import { bookRepository, clientRepository, emailRepository } from "../ports";
|
|
3
|
+
import { bookRepository, clientRepository, emailRepository, waitingListEntryRepository } from "../ports";
|
|
4
4
|
|
|
5
5
|
export const useCases = DInvocation.resolveReaders(
|
|
6
6
|
UseCases,
|
|
@@ -8,5 +8,6 @@ export const useCases = DInvocation.resolveReaders(
|
|
|
8
8
|
bookRepository,
|
|
9
9
|
clientRepository,
|
|
10
10
|
emailRepository,
|
|
11
|
+
waitingListEntryRepository,
|
|
11
12
|
},
|
|
12
13
|
);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Type
|
|
1
|
+
# Type-Driven Design
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Concevoir un domaine qui impose les états, les preuves et le déroulement des opérations métier, puis satisfaire ses contrats dans l'application et l'infrastructure.
|
package/docs/concepts.llms.md
CHANGED
|
@@ -78,6 +78,11 @@ const normalizedTags = DCommon.pipe(
|
|
|
78
78
|
DArray.filter(DString.isNotEmpty),
|
|
79
79
|
DArray.map(DString.toLowerCase),
|
|
80
80
|
);
|
|
81
|
+
type _CheckNormalizedTags = DCommon.ExpectType<
|
|
82
|
+
typeof normalizedTags,
|
|
83
|
+
readonly (Lowercase<string> & DString.MinCharacters<1>)[] & DArray.MaxElements<3>,
|
|
84
|
+
"strict"
|
|
85
|
+
>;
|
|
81
86
|
// Résultat : ["typescript", "duplojs", "functional"].
|
|
82
87
|
// Chaque étape reçoit la sortie précédente ; les types suivent ces transformations.
|
|
83
88
|
// On peut ajouter, retirer ou réordonner les étapes sans restructurer le traitement.
|
|
@@ -294,6 +299,28 @@ Sélectionner les variantes sans identité explicite par des patterns, y compris
|
|
|
294
299
|
|
|
295
300
|
Affiner les branches et réduire les cas restants, avec sélection positive ou inverse.
|
|
296
301
|
|
|
302
|
+
## Kind
|
|
303
|
+
|
|
304
|
+
Identité et métadonnées internes des objets de l'écosystème, reconnaissables au typage et au runtime.
|
|
305
|
+
|
|
306
|
+
### Identité des objets avec les kinds
|
|
307
|
+
|
|
308
|
+
De nombreux objets DuploJS portent des kinds pour être reconnus et distingués malgré le typage structurel de TypeScript.
|
|
309
|
+
|
|
310
|
+
Ces clés textuelles au runtime, représentées sous un symbole dans les types, portent identité et métadonnées. Leur reconnaissance survit au transport si la sérialisation les préserve.
|
|
311
|
+
|
|
312
|
+
Les kinds servent surtout à construire les outils ; utiliser DuploJS ne demande généralement pas de les manipuler directement.
|
|
313
|
+
|
|
314
|
+
### [Métadonnées internes des kinds](concepts/01-fundamental/08-kind/20-metadata.md)
|
|
315
|
+
|
|
316
|
+
Un petit store attaché à l'objet, exploitable dans les types ou au runtime selon son contrat.
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
### [Transport de l'identité entre programmes](concepts/01-fundamental/08-kind/30-transport.md)
|
|
320
|
+
|
|
321
|
+
Reconnaître une donnée après désérialisation sans dépendre du constructeur de son runtime d'origine.
|
|
322
|
+
|
|
323
|
+
|
|
297
324
|
# Serveur
|
|
298
325
|
|
|
299
326
|
## Manipuler des fichiers
|
|
@@ -310,15 +337,15 @@ Contraintes `Path`, `Absolute` et `Segment` pour valider, extraire et résoudre
|
|
|
310
337
|
|
|
311
338
|
## HTTP
|
|
312
339
|
|
|
313
|
-
|
|
340
|
+
Développement d’API HTTP avec DuploJS, de la définition des routes au démarrage du serveur.
|
|
314
341
|
|
|
315
342
|
### [Créer une application HTTP](concepts/02-server/20-http/10-init.ts)
|
|
316
343
|
|
|
317
|
-
Configuration d'un `Hub
|
|
344
|
+
Configuration d'un `Hub` et enregistrement des routes d'une application HTTP.
|
|
318
345
|
|
|
319
346
|
### [Créer une route HTTP](concepts/02-server/20-http/20-route.ts)
|
|
320
347
|
|
|
321
|
-
|
|
348
|
+
Définir les entrées d'une route, préparer les données du traitement et produire sa réponse HTTP.
|
|
322
349
|
|
|
323
350
|
### [Faire une routine de vérification](concepts/02-server/20-http/30-routine.ts)
|
|
324
351
|
|
|
@@ -328,9 +355,9 @@ Vérifications dans les flux HTTP, réutilisation des traitements et adaptation
|
|
|
328
355
|
|
|
329
356
|
Déclaration d'une politique unique pour créer et vérifier une famille de tokens.
|
|
330
357
|
|
|
331
|
-
### [
|
|
358
|
+
### [Générer la documentation OpenAPI d'une API HTTP.](concepts/02-server/20-http/50-open-api.ts)
|
|
332
359
|
|
|
333
|
-
|
|
360
|
+
Décrire les réponses des routes et exposer leur documentation.
|
|
334
361
|
|
|
335
362
|
## Environnement
|
|
336
363
|
|
|
@@ -367,9 +394,7 @@ Communication typée avec des API HTTP.
|
|
|
367
394
|
|
|
368
395
|
### [Initialiser un client HTTP](concepts/03-client/10-http/10-init.ts)
|
|
369
396
|
|
|
370
|
-
|
|
371
|
-
globale et conservation du typage des requêtes et réponses exposées par le
|
|
372
|
-
serveur.
|
|
397
|
+
Configuration d'un client HTTP typé et des paramètres communs aux requêtes.
|
|
373
398
|
|
|
374
399
|
### [Effectuer une requête HTTP](concepts/03-client/10-http/20-request.ts)
|
|
375
400
|
|
|
@@ -383,6 +408,11 @@ Comportements transversaux et instrumentation du cycle des échanges HTTP.
|
|
|
383
408
|
|
|
384
409
|
Création et gestion de formulaires typés pour les interfaces utilisateur.
|
|
385
410
|
|
|
411
|
+
## [Intégrer un formulaire dans une page Vue](concepts/03-client/20-form/50-integration.md)
|
|
412
|
+
|
|
413
|
+
Séparer la logique d'un formulaire de son rendu dans une page Vue.
|
|
414
|
+
|
|
415
|
+
|
|
386
416
|
### [Créer un formulaire](concepts/03-client/20-form/10-init.ts)
|
|
387
417
|
|
|
388
418
|
Initialisation et cycle de vie d’un formulaire Vue typé.
|
|
@@ -429,47 +459,63 @@ Organisation d’une suite E2E selon les pages et les composants du site testé.
|
|
|
429
459
|
|
|
430
460
|
Scénarios utilisateur, interactions et vérifications avec les objets du site.
|
|
431
461
|
|
|
432
|
-
# Type
|
|
462
|
+
# Type-Driven Design
|
|
433
463
|
|
|
434
|
-
|
|
464
|
+
Concevoir un domaine qui impose les états, les preuves et le déroulement des opérations métier, puis satisfaire ses contrats dans l'application et l'infrastructure.
|
|
435
465
|
|
|
436
466
|
## Architecture
|
|
437
467
|
|
|
438
|
-
|
|
468
|
+
Répartir la décision métier, la satisfaction des contrats et la réalisation technique entre domaine, application et infrastructure.
|
|
439
469
|
|
|
440
470
|
### [Frontières entre domaine, application et infrastructure](concepts/05-type-driven-design/01-architecture/10-boundaries.md)
|
|
441
471
|
|
|
442
|
-
|
|
472
|
+
Responsabilités des couches, sens des dépendances et préparation des garanties aux frontières du système.
|
|
473
|
+
|
|
443
474
|
|
|
444
475
|
## Domaines
|
|
445
476
|
|
|
446
|
-
|
|
477
|
+
États et transitions des entités, orchestration par les agrégats, capacités des repositories et preuves de contexte produites par les refinements.
|
|
478
|
+
|
|
479
|
+
### [Entités, qualifications et faits](concepts/05-type-driven-design/02-domains/10-entities.md)
|
|
480
|
+
|
|
481
|
+
Modéliser les données et leurs invariants, certifier leurs conditions actuelles et rendre explicites les préconditions des transitions métier.
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
### [Agrégats, preuves et workflows](concepts/05-type-driven-design/02-domains/20-aggregates.md)
|
|
485
|
+
|
|
486
|
+
Définir le déroulement d'une opération métier, les preuves qui l'autorisent et les demandes commit, resolve et iterate que l'application doit satisfaire.
|
|
447
487
|
|
|
448
|
-
### [Conception des entités en Type-Driven Design](concepts/05-type-driven-design/02-domains/10-entities.md)
|
|
449
488
|
|
|
450
|
-
|
|
489
|
+
### [Repositories : capacités extérieures du domaine](concepts/05-type-driven-design/02-domains/30-repositories.md)
|
|
451
490
|
|
|
452
|
-
|
|
491
|
+
Définir les opérations extérieures utiles au métier, leurs résultats et leurs garanties sans exposer leur réalisation technique.
|
|
453
492
|
|
|
454
|
-
Contrats des transactions métier, préconditions et orchestration de faits réutilisables.
|
|
455
493
|
|
|
456
|
-
### [
|
|
494
|
+
### [Refinements : qualifier un contexte métier](concepts/05-type-driven-design/02-domains/40-refinements.md)
|
|
495
|
+
|
|
496
|
+
Vérifier une combinaison d'entités ou de valeurs et produire la preuve de cet état commun sans réaliser de transition.
|
|
457
497
|
|
|
458
|
-
Contrats des opérations nécessaires au métier dont l'implémentation technique reste extérieure au domaine.
|
|
459
498
|
|
|
460
499
|
## Applications
|
|
461
500
|
|
|
462
|
-
|
|
501
|
+
Use cases pour satisfaire les agrégats et ports pour définir leurs capacités extérieures, leurs extensions techniques et leurs dépendances injectables.
|
|
502
|
+
|
|
503
|
+
### [Use cases : satisfaire les agrégats](concepts/05-type-driven-design/03-applications/10-use-case.md)
|
|
504
|
+
|
|
505
|
+
Préparer les garanties requises, raccorder les workflows aux ports applicatifs et encadrer leur exécution, notamment transactionnelle.
|
|
463
506
|
|
|
464
|
-
### [Conception des use cases en Type-Driven Design](concepts/05-type-driven-design/03-applications/10-use-case.md)
|
|
465
507
|
|
|
466
|
-
|
|
508
|
+
### [Ports : contrats des dépendances applicatives](concepts/05-type-driven-design/03-applications/20-ports.md)
|
|
509
|
+
|
|
510
|
+
Définir les capacités requises par l'application, étendre les résultats des contrats du domaine et rendre leurs implémentations injectables sans dépendre d'une technologie.
|
|
511
|
+
|
|
467
512
|
|
|
468
513
|
## Infrastructure
|
|
469
514
|
|
|
470
|
-
|
|
515
|
+
Réaliser les garanties des ports, résoudre les use cases et adapter leurs entrées et résultats aux systèmes concrets.
|
|
516
|
+
|
|
517
|
+
### [Infrastructure : réaliser et raccorder les contrats](concepts/05-type-driven-design/04-infrastructure/10-implementation.md)
|
|
471
518
|
|
|
472
|
-
|
|
519
|
+
Implémenter les capacités techniques demandées par l'application, établir réellement leurs garanties et exposer les opérations aux consommateurs.
|
|
473
520
|
|
|
474
|
-
Fournir les dépendances concrètes de l'application et raccorder ses capacités aux points d'entrée du système.
|
|
475
521
|
|