@jonloucks/contracts-ts 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -21
- package/api/AutoClose.d.ts +2 -2
- package/api/AutoClose.d.ts.map +1 -1
- package/api/AutoClose.js +15 -23
- package/api/AutoClose.js.map +1 -1
- package/api/AutoCloseFactory.d.ts +3 -3
- package/api/AutoCloseFactory.d.ts.map +1 -1
- package/api/AutoCloseFactory.js +5 -9
- package/api/AutoCloseFactory.js.map +1 -1
- package/api/AutoOpen.js +3 -6
- package/api/AutoOpen.js.map +1 -1
- package/api/BasicContract.js +6 -11
- package/api/BasicContract.js.map +1 -1
- package/api/BindStrategy.js +4 -9
- package/api/BindStrategy.js.map +1 -1
- package/api/Contract.js +3 -6
- package/api/Contract.js.map +1 -1
- package/api/ContractException.js +5 -10
- package/api/ContractException.js.map +1 -1
- package/api/ContractFactory.js +3 -6
- package/api/ContractFactory.js.map +1 -1
- package/api/Contracts.d.ts +1 -1
- package/api/Contracts.d.ts.map +1 -1
- package/api/Contracts.js +4 -7
- package/api/Contracts.js.map +1 -1
- package/api/ContractsFactory.js +3 -6
- package/api/ContractsFactory.js.map +1 -1
- package/api/Convenience.d.ts +21 -16
- package/api/Convenience.d.ts.map +1 -1
- package/api/Convenience.js +17 -35
- package/api/Convenience.js.map +1 -1
- package/api/Open.d.ts.map +1 -1
- package/api/Open.js +9 -13
- package/api/Open.js.map +1 -1
- package/api/Promisor.d.ts +9 -5
- package/api/Promisor.d.ts.map +1 -1
- package/api/Promisor.js +18 -23
- package/api/Promisor.js.map +1 -1
- package/api/PromisorFactory.d.ts +3 -2
- package/api/PromisorFactory.d.ts.map +1 -1
- package/api/PromisorFactory.js +5 -9
- package/api/PromisorFactory.js.map +1 -1
- package/api/RatifiedContract.js +11 -16
- package/api/RatifiedContract.js.map +1 -1
- package/api/Repository.d.ts +2 -2
- package/api/Repository.d.ts.map +1 -1
- package/api/Repository.js +4 -7
- package/api/Repository.js.map +1 -1
- package/api/RepositoryFactory.js +5 -9
- package/api/RepositoryFactory.js.map +1 -1
- package/api/Types.d.ts +0 -24
- package/api/Types.d.ts.map +1 -1
- package/api/Types.js +13 -62
- package/api/Types.js.map +1 -1
- package/auxiliary/AtomicBoolean.js +3 -6
- package/auxiliary/AtomicBoolean.js.map +1 -1
- package/auxiliary/AtomicBooleanFactory.js +5 -9
- package/auxiliary/AtomicBooleanFactory.js.map +1 -1
- package/auxiliary/AtomicInteger.js +3 -6
- package/auxiliary/AtomicInteger.js.map +1 -1
- package/auxiliary/AtomicIntegerFactory.js +5 -9
- package/auxiliary/AtomicIntegerFactory.js.map +1 -1
- package/auxiliary/AtomicReference.js +3 -6
- package/auxiliary/AtomicReference.js.map +1 -1
- package/auxiliary/AtomicReferenceFactory.js +5 -9
- package/auxiliary/AtomicReferenceFactory.js.map +1 -1
- package/auxiliary/Checks.js +23 -36
- package/auxiliary/Checks.js.map +1 -1
- package/auxiliary/Consumer.js +7 -12
- package/auxiliary/Consumer.js.map +1 -1
- package/auxiliary/Convenience.d.ts +10 -6
- package/auxiliary/Convenience.d.ts.map +1 -1
- package/auxiliary/Convenience.js +17 -19
- package/auxiliary/Convenience.js.map +1 -1
- package/auxiliary/IdempotenState.d.ts +1 -1
- package/auxiliary/IdempotenState.d.ts.map +1 -1
- package/auxiliary/IdempotenState.js +2 -5
- package/auxiliary/IdempotenState.js.map +1 -1
- package/auxiliary/Idempotent.js +3 -6
- package/auxiliary/Idempotent.js.map +1 -1
- package/auxiliary/IdempotentFactory.js +5 -9
- package/auxiliary/IdempotentFactory.js.map +1 -1
- package/auxiliary/IllegalArgumentException.js +4 -8
- package/auxiliary/IllegalArgumentException.js.map +1 -1
- package/auxiliary/IllegalStateException.js +4 -8
- package/auxiliary/IllegalStateException.js.map +1 -1
- package/auxiliary/Predicate.js +9 -15
- package/auxiliary/Predicate.js.map +1 -1
- package/auxiliary/Supplier.js +10 -16
- package/auxiliary/Supplier.js.map +1 -1
- package/auxiliary/Transform.js +11 -18
- package/auxiliary/Transform.js.map +1 -1
- package/auxiliary/Validate.js +12 -15
- package/auxiliary/Validate.js.map +1 -1
- package/impl/AtomicBoolean.impl.js +1 -4
- package/impl/AtomicBoolean.impl.js.map +1 -1
- package/impl/AtomicBooleanFactory.impl.js +3 -6
- package/impl/AtomicBooleanFactory.impl.js.map +1 -1
- package/impl/AtomicInteger.impl.js +1 -4
- package/impl/AtomicInteger.impl.js.map +1 -1
- package/impl/AtomicIntegerFactory.impl.js +3 -6
- package/impl/AtomicIntegerFactory.impl.js.map +1 -1
- package/impl/AtomicReference.impl.js +2 -7
- package/impl/AtomicReference.impl.js.map +1 -1
- package/impl/AtomicReferenceFactory.impl.js +3 -6
- package/impl/AtomicReferenceFactory.impl.js.map +1 -1
- package/impl/AutoCloseFactory.impl.d.ts +0 -3
- package/impl/AutoCloseFactory.impl.d.ts.map +1 -1
- package/impl/AutoCloseFactory.impl.js +7 -10
- package/impl/AutoCloseFactory.impl.js.map +1 -1
- package/impl/AutoCloseMany.impl.d.ts +0 -2
- package/impl/AutoCloseMany.impl.d.ts.map +1 -1
- package/impl/AutoCloseMany.impl.js +5 -8
- package/impl/AutoCloseMany.impl.js.map +1 -1
- package/impl/AutoCloseOne.impl.d.ts.map +1 -1
- package/impl/AutoCloseOne.impl.js +8 -11
- package/impl/AutoCloseOne.impl.js.map +1 -1
- package/impl/ContractFactory.impl.js +7 -11
- package/impl/ContractFactory.impl.js.map +1 -1
- package/impl/Contracts.impl.d.ts.map +1 -1
- package/impl/Contracts.impl.js +38 -41
- package/impl/Contracts.impl.js.map +1 -1
- package/impl/ContractsFactory.impl.js +28 -32
- package/impl/ContractsFactory.impl.js.map +1 -1
- package/impl/ContractsWrapper.impl.js +3 -6
- package/impl/ContractsWrapper.impl.js.map +1 -1
- package/impl/Events.d.ts +1 -2
- package/impl/Events.d.ts.map +1 -1
- package/impl/Events.impl.d.ts +1 -2
- package/impl/Events.impl.d.ts.map +1 -1
- package/impl/Events.impl.js +6 -9
- package/impl/Events.impl.js.map +1 -1
- package/impl/Events.js +1 -2
- package/impl/Events.js.map +1 -1
- package/impl/ExtractorPromisor.impl.d.ts +2 -1
- package/impl/ExtractorPromisor.impl.d.ts.map +1 -1
- package/impl/ExtractorPromisor.impl.js +6 -9
- package/impl/ExtractorPromisor.impl.js.map +1 -1
- package/impl/Idempotent.impl.js +10 -13
- package/impl/Idempotent.impl.js.map +1 -1
- package/impl/IdempotentFactory.impl.js +5 -8
- package/impl/IdempotentFactory.impl.js.map +1 -1
- package/impl/Internal.impl.js +5 -8
- package/impl/Internal.impl.js.map +1 -1
- package/impl/LifeCyclePromisor.impl.js +19 -22
- package/impl/LifeCyclePromisor.impl.js.map +1 -1
- package/impl/Policy.d.ts +0 -1
- package/impl/Policy.d.ts.map +1 -1
- package/impl/Policy.impl.d.ts +1 -3
- package/impl/Policy.impl.d.ts.map +1 -1
- package/impl/Policy.impl.js +7 -10
- package/impl/Policy.impl.js.map +1 -1
- package/impl/Policy.js +1 -2
- package/impl/PromisorFactory.impl.d.ts.map +1 -1
- package/impl/PromisorFactory.impl.js +11 -14
- package/impl/PromisorFactory.impl.js.map +1 -1
- package/impl/Repository.impl.d.ts.map +1 -1
- package/impl/Repository.impl.js +19 -22
- package/impl/Repository.impl.js.map +1 -1
- package/impl/RepositoryFactory.impl.js +3 -6
- package/impl/RepositoryFactory.impl.js.map +1 -1
- package/impl/SingletonPromisor.impl.js +7 -10
- package/impl/SingletonPromisor.impl.js.map +1 -1
- package/impl/Storage.impl.js +3 -7
- package/impl/Storage.impl.js.map +1 -1
- package/impl/ValuePromisor.impl.js +1 -4
- package/impl/ValuePromisor.impl.js.map +1 -1
- package/index.d.ts +8 -20
- package/index.d.ts.map +1 -1
- package/index.js +10 -38
- package/index.js.map +1 -1
- package/package.json +10 -14
- package/version.js +2 -5
- package/version.js.map +1 -1
- package/auxiliary/Functional.d.ts +0 -9
- package/auxiliary/Functional.d.ts.map +0 -1
- package/auxiliary/Functional.js +0 -23
- package/auxiliary/Functional.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
import { Contracts } from "@jonloucks/contracts-ts/api/Contracts";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export { ContractException } from "@jonloucks/contracts-ts/api/ContractException";
|
|
8
|
-
export { Contracts, Config as ContractsConfig } from "@jonloucks/contracts-ts/api/Contracts";
|
|
9
|
-
export { ContractsFactory } from "@jonloucks/contracts-ts/api/ContractsFactory";
|
|
10
|
-
export { Promisor, typeToPromisor } from "@jonloucks/contracts-ts/api/Promisor";
|
|
11
|
-
export { CONTRACT as PROMISOR_FACTORY, PromisorFactory } from "@jonloucks/contracts-ts/api/PromisorFactory";
|
|
12
|
-
export { Repository } from "@jonloucks/contracts-ts/api/Repository";
|
|
13
|
-
export { CONTRACT as REPOSITORY_FACTORY, RepositoryFactory } from "@jonloucks/contracts-ts/api/RepositoryFactory";
|
|
14
|
-
export { guardFunctions as hasFunctions, isNotPresent, isNumber, isPresent, isString, OptionalType, RequiredType } from "@jonloucks/contracts-ts/api/Types";
|
|
15
|
-
export { validateContracts } from "@jonloucks/contracts-ts/auxiliary/Validate";
|
|
16
|
-
import { createContracts, create as createContractsFactory } from "./impl/ContractsFactory.impl";
|
|
17
|
-
export { createContract, create as createContractFactory } from "./impl/ContractFactory.impl";
|
|
18
|
-
export { VERSION } from "./version";
|
|
19
|
-
export { createContracts, createContractsFactory };
|
|
1
|
+
import { type Contracts, type Config as ContractsConfig } from "@jonloucks/contracts-ts/api/Contracts";
|
|
2
|
+
import { ContractException } from "@jonloucks/contracts-ts/api/ContractException";
|
|
3
|
+
import { type Contract, type Config as ContractConfig } from "@jonloucks/contracts-ts/api/Contract";
|
|
4
|
+
import { createContracts } from "./impl/ContractsFactory.impl.js";
|
|
5
|
+
import { createContract } from "./impl/ContractFactory.impl.js";
|
|
6
|
+
import { VERSION } from "./version.js";
|
|
20
7
|
/**
|
|
21
8
|
* A shared global Contracts instance.
|
|
22
9
|
*
|
|
@@ -26,5 +13,6 @@ export { createContracts, createContractsFactory };
|
|
|
26
13
|
*
|
|
27
14
|
* Note: accepts only ratified contracts and closes on process exit.
|
|
28
15
|
*/
|
|
29
|
-
|
|
16
|
+
declare const CONTRACTS: Contracts;
|
|
17
|
+
export { VERSION, CONTRACTS, Contract, ContractConfig, ContractException, Contracts, ContractsConfig, createContract, createContracts };
|
|
30
18
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,IAAI,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAEvG,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,IAAI,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;;;;;;;GAQG;AACH,QAAA,MAAM,SAAS,EAAE,SASb,CAAC;AAGL,OAAO,EACL,OAAO,EACP,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,cAAc,EACd,eAAe,EAChB,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,38 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Object.defineProperty(exports, "typeToAutoClose", { enumerable: true, get: function () { return AutoClose_1.typeToAutoClose; } });
|
|
7
|
-
var AutoCloseFactory_1 = require("@jonloucks/contracts-ts/api/AutoCloseFactory");
|
|
8
|
-
Object.defineProperty(exports, "AUTO_CLOSE_FACTORY", { enumerable: true, get: function () { return AutoCloseFactory_1.CONTRACT; } });
|
|
9
|
-
var BindStrategy_1 = require("@jonloucks/contracts-ts/api/BindStrategy");
|
|
10
|
-
Object.defineProperty(exports, "DEFAULT_BIND_STRATEGY", { enumerable: true, get: function () { return BindStrategy_1.DEFAULT_BIND_STRATEGY; } });
|
|
11
|
-
var ContractException_1 = require("@jonloucks/contracts-ts/api/ContractException");
|
|
12
|
-
Object.defineProperty(exports, "ContractException", { enumerable: true, get: function () { return ContractException_1.ContractException; } });
|
|
13
|
-
var Promisor_1 = require("@jonloucks/contracts-ts/api/Promisor");
|
|
14
|
-
Object.defineProperty(exports, "typeToPromisor", { enumerable: true, get: function () { return Promisor_1.typeToPromisor; } });
|
|
15
|
-
var PromisorFactory_1 = require("@jonloucks/contracts-ts/api/PromisorFactory");
|
|
16
|
-
Object.defineProperty(exports, "PROMISOR_FACTORY", { enumerable: true, get: function () { return PromisorFactory_1.CONTRACT; } });
|
|
17
|
-
var RepositoryFactory_1 = require("@jonloucks/contracts-ts/api/RepositoryFactory");
|
|
18
|
-
Object.defineProperty(exports, "REPOSITORY_FACTORY", { enumerable: true, get: function () { return RepositoryFactory_1.CONTRACT; } });
|
|
19
|
-
var Types_1 = require("@jonloucks/contracts-ts/api/Types");
|
|
20
|
-
Object.defineProperty(exports, "hasFunctions", { enumerable: true, get: function () { return Types_1.guardFunctions; } });
|
|
21
|
-
Object.defineProperty(exports, "isNotPresent", { enumerable: true, get: function () { return Types_1.isNotPresent; } });
|
|
22
|
-
Object.defineProperty(exports, "isNumber", { enumerable: true, get: function () { return Types_1.isNumber; } });
|
|
23
|
-
Object.defineProperty(exports, "isPresent", { enumerable: true, get: function () { return Types_1.isPresent; } });
|
|
24
|
-
Object.defineProperty(exports, "isString", { enumerable: true, get: function () { return Types_1.isString; } });
|
|
25
|
-
var Validate_2 = require("@jonloucks/contracts-ts/auxiliary/Validate");
|
|
26
|
-
Object.defineProperty(exports, "validateContracts", { enumerable: true, get: function () { return Validate_2.validateContracts; } });
|
|
27
|
-
// no qualified paths for things not exposed publicly
|
|
28
|
-
const ContractsFactory_impl_1 = require("./impl/ContractsFactory.impl");
|
|
29
|
-
Object.defineProperty(exports, "createContracts", { enumerable: true, get: function () { return ContractsFactory_impl_1.createContracts; } });
|
|
30
|
-
Object.defineProperty(exports, "createContractsFactory", { enumerable: true, get: function () { return ContractsFactory_impl_1.create; } });
|
|
31
|
-
var ContractFactory_impl_1 = require("./impl/ContractFactory.impl");
|
|
32
|
-
Object.defineProperty(exports, "createContract", { enumerable: true, get: function () { return ContractFactory_impl_1.createContract; } });
|
|
33
|
-
Object.defineProperty(exports, "createContractFactory", { enumerable: true, get: function () { return ContractFactory_impl_1.create; } });
|
|
34
|
-
var version_1 = require("./version");
|
|
35
|
-
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
|
|
1
|
+
import { validateContracts } from "@jonloucks/contracts-ts/auxiliary/Validate";
|
|
2
|
+
import { ContractException } from "@jonloucks/contracts-ts/api/ContractException";
|
|
3
|
+
import { createContracts } from "./impl/ContractsFactory.impl.js";
|
|
4
|
+
import { createContract } from "./impl/ContractFactory.impl.js";
|
|
5
|
+
import { VERSION } from "./version.js";
|
|
36
6
|
/**
|
|
37
7
|
* A shared global Contracts instance.
|
|
38
8
|
*
|
|
@@ -42,14 +12,16 @@ Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () {
|
|
|
42
12
|
*
|
|
43
13
|
* Note: accepts only ratified contracts and closes on process exit.
|
|
44
14
|
*/
|
|
45
|
-
|
|
15
|
+
const CONTRACTS = (() => {
|
|
46
16
|
const globalConfig = {
|
|
47
17
|
ratified: true,
|
|
48
18
|
shutdownEvents: ['exit']
|
|
49
19
|
};
|
|
50
|
-
const contracts =
|
|
20
|
+
const contracts = createContracts(globalConfig);
|
|
51
21
|
contracts.open(); // closed on exit
|
|
52
|
-
|
|
22
|
+
validateContracts(contracts);
|
|
53
23
|
return contracts;
|
|
54
24
|
})();
|
|
25
|
+
// decide on what to export from this module. For now, only the essential functions and the shared global instance are exported.
|
|
26
|
+
export { VERSION, CONTRACTS, ContractException, createContract, createContracts };
|
|
55
27
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,SAAS,GAAc,CAAC,GAAc,EAAE;IAC5C,MAAM,YAAY,GAAoB;QACpC,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,CAAC,MAAM,CAAC;KACzB,CAAC;IACF,MAAM,SAAS,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IAChD,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,iBAAiB;IACnC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC7B,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC,EAAE,CAAC;AAEL,gIAAgI;AAChI,OAAO,EACL,OAAO,EACP,SAAS,EAGT,iBAAiB,EAGjB,cAAc,EACd,eAAe,EAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jonloucks/contracts-ts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Typescript Dependency Contracts for dependency inversion",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "index.js",
|
|
6
7
|
"types": "index.d.ts",
|
|
7
8
|
"exports": {
|
|
@@ -32,10 +33,9 @@
|
|
|
32
33
|
],
|
|
33
34
|
"scripts": {
|
|
34
35
|
"build": "tsc",
|
|
35
|
-
"test": "
|
|
36
|
-
"test:watch": "
|
|
37
|
-
"test:coverage": "
|
|
38
|
-
"test:diagnostics": "jest --detectOpenHandles",
|
|
36
|
+
"test": "tsx --test $(find src -name '*.test.ts')",
|
|
37
|
+
"test:watch": "tsx --test --watch $(find src -name '*.test.ts')",
|
|
38
|
+
"test:coverage": "npx c8 --check-coverage --lines 95 --functions 95 --branches 95 --statements 95 --reporter=lcov npx tsx --test $(find src -name '*.test.ts')",
|
|
39
39
|
"lint": "eslint . --ext .ts",
|
|
40
40
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
41
41
|
"prepublishOnly": "npm run build",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"compile": "tsc",
|
|
50
50
|
"postversion": "npm run applyversion",
|
|
51
51
|
"applyversion": "npx badges-ts apply-version",
|
|
52
|
-
"pack-package": "npm run before:publish && cd dist && npm pack && npm run after:publish"
|
|
52
|
+
"pack-package": "npm run before:publish && mkdir -p packs && cd dist && npm pack && mv *.tgz ../packs/ && npm run after:publish"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"typescript",
|
|
@@ -67,18 +67,14 @@
|
|
|
67
67
|
"registry": "https://registry.npmjs.org/"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@
|
|
71
|
-
"@types/node": "^25.2.
|
|
70
|
+
"@jonloucks/badges-ts": "^0.1.1",
|
|
71
|
+
"@types/node": "^25.2.3",
|
|
72
72
|
"@typescript-eslint/eslint-plugin": "^8.55.0",
|
|
73
73
|
"@typescript-eslint/parser": "^8.53.1",
|
|
74
|
+
"c8": "^10.1.3",
|
|
74
75
|
"eslint": "^9.39.2",
|
|
75
|
-
"
|
|
76
|
-
"jest-mock-extended": "^4.0.0",
|
|
77
|
-
"ts-jest": "^29.4.6",
|
|
76
|
+
"tsx": "^4.21.0",
|
|
78
77
|
"typedoc": "^0.28.15",
|
|
79
78
|
"typescript": "^5.9.3"
|
|
80
|
-
},
|
|
81
|
-
"dependencies": {
|
|
82
|
-
"@jonloucks/badges-ts": "^0.1.0"
|
|
83
79
|
}
|
|
84
80
|
}
|
package/version.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VERSION = exports.NAME = void 0;
|
|
4
1
|
// generated file - do not edit
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export const NAME = "@jonloucks/contracts-ts";
|
|
3
|
+
export const VERSION = "2.0.0";
|
|
7
4
|
//# sourceMappingURL=version.js.map
|
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAC,MAAM,IAAI,GAAW,yBAAyB,CAAC;AACtD,MAAM,CAAC,MAAM,OAAO,GAAW,OAAO,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type { Consumer, Method as ConsumerFunction, Type as ConsumerType } from "@jonloucks/contracts-ts/auxiliary/Consumer";
|
|
2
|
-
export { guard as consumerGuard, fromType as consumerFromType, check as consumerCheck } from "@jonloucks/contracts-ts/auxiliary/Consumer";
|
|
3
|
-
export type { Predicate, Method as PredicateFunction, Type as PredicateType } from "@jonloucks/contracts-ts/auxiliary/Predicate";
|
|
4
|
-
export { guard as predicateGuard, fromType as predicateFromType, check as predicateCheck, toValue as predicateToValue } from "@jonloucks/contracts-ts/auxiliary/Predicate";
|
|
5
|
-
export type { Supplier, Method as SupplierFunction, Type as SupplierType } from "@jonloucks/contracts-ts/auxiliary/Supplier";
|
|
6
|
-
export { guard as supplierGuard, fromType as supplierFromType, check as supplierCheck, toValue as supplierToValue } from "@jonloucks/contracts-ts/auxiliary/Supplier";
|
|
7
|
-
export type { Transform, Method as TransformFunction, Type as TransformType } from "@jonloucks/contracts-ts/auxiliary/Transform";
|
|
8
|
-
export { guard as transformGuard, fromType as transformFromType, check as transformCheck, toValue as transformToValue } from "@jonloucks/contracts-ts/auxiliary/Transform";
|
|
9
|
-
//# sourceMappingURL=Functional.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Functional.d.ts","sourceRoot":"","sources":["../../src/auxiliary/Functional.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,gBAAgB,EAAE,IAAI,IAAI,YAAY,EAAE,MACnE,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,QAAQ,IAAI,gBAAgB,EAAE,KAAK,IAAI,aAAa,EAAE,MAChF,4CAA4C,CAAC;AAEpD,YAAY,EAAE,SAAS,EAAE,MAAM,IAAI,iBAAiB,EAAE,IAAI,IAAI,aAAa,EAAE,MACtE,6CAA6C,CAAC;AAErD,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,QAAQ,IAAI,iBAAiB,EAAE,KAAK,IAAI,cAAc,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAChH,6CAA6C,CAAC;AAErD,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,gBAAgB,EAAE,IAAI,IAAI,YAAY,EAAE,MACnE,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,QAAQ,IAAI,gBAAgB,EAAE,KAAK,IAAI,aAAa,EAAE,OAAO,IAAI,eAAe,EAAE,MAC5G,4CAA4C,CAAC;AAEpD,YAAY,EAAE,SAAS,EAAE,MAAM,IAAI,iBAAiB,EAAE,IAAI,IAAI,aAAa,EAAE,MACtE,6CAA6C,CAAC;AAErD,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,QAAQ,IAAI,iBAAiB,EAAE,KAAK,IAAI,cAAc,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAChH,6CAA6C,CAAC"}
|
package/auxiliary/Functional.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformToValue = exports.transformCheck = exports.transformFromType = exports.transformGuard = exports.supplierToValue = exports.supplierCheck = exports.supplierFromType = exports.supplierGuard = exports.predicateToValue = exports.predicateCheck = exports.predicateFromType = exports.predicateGuard = exports.consumerCheck = exports.consumerFromType = exports.consumerGuard = void 0;
|
|
4
|
-
var Consumer_1 = require("@jonloucks/contracts-ts/auxiliary/Consumer");
|
|
5
|
-
Object.defineProperty(exports, "consumerGuard", { enumerable: true, get: function () { return Consumer_1.guard; } });
|
|
6
|
-
Object.defineProperty(exports, "consumerFromType", { enumerable: true, get: function () { return Consumer_1.fromType; } });
|
|
7
|
-
Object.defineProperty(exports, "consumerCheck", { enumerable: true, get: function () { return Consumer_1.check; } });
|
|
8
|
-
var Predicate_1 = require("@jonloucks/contracts-ts/auxiliary/Predicate");
|
|
9
|
-
Object.defineProperty(exports, "predicateGuard", { enumerable: true, get: function () { return Predicate_1.guard; } });
|
|
10
|
-
Object.defineProperty(exports, "predicateFromType", { enumerable: true, get: function () { return Predicate_1.fromType; } });
|
|
11
|
-
Object.defineProperty(exports, "predicateCheck", { enumerable: true, get: function () { return Predicate_1.check; } });
|
|
12
|
-
Object.defineProperty(exports, "predicateToValue", { enumerable: true, get: function () { return Predicate_1.toValue; } });
|
|
13
|
-
var Supplier_1 = require("@jonloucks/contracts-ts/auxiliary/Supplier");
|
|
14
|
-
Object.defineProperty(exports, "supplierGuard", { enumerable: true, get: function () { return Supplier_1.guard; } });
|
|
15
|
-
Object.defineProperty(exports, "supplierFromType", { enumerable: true, get: function () { return Supplier_1.fromType; } });
|
|
16
|
-
Object.defineProperty(exports, "supplierCheck", { enumerable: true, get: function () { return Supplier_1.check; } });
|
|
17
|
-
Object.defineProperty(exports, "supplierToValue", { enumerable: true, get: function () { return Supplier_1.toValue; } });
|
|
18
|
-
var Transform_1 = require("@jonloucks/contracts-ts/auxiliary/Transform");
|
|
19
|
-
Object.defineProperty(exports, "transformGuard", { enumerable: true, get: function () { return Transform_1.guard; } });
|
|
20
|
-
Object.defineProperty(exports, "transformFromType", { enumerable: true, get: function () { return Transform_1.fromType; } });
|
|
21
|
-
Object.defineProperty(exports, "transformCheck", { enumerable: true, get: function () { return Transform_1.check; } });
|
|
22
|
-
Object.defineProperty(exports, "transformToValue", { enumerable: true, get: function () { return Transform_1.toValue; } });
|
|
23
|
-
//# sourceMappingURL=Functional.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Functional.js","sourceRoot":"","sources":["../../src/auxiliary/Functional.ts"],"names":[],"mappings":";;;AAIA,uEACoD;AAD3C,yGAAA,KAAK,OAAiB;AAAE,4GAAA,QAAQ,OAAoB;AAAE,yGAAA,KAAK,OAAiB;AAMrF,yEACqD;AAD5C,2GAAA,KAAK,OAAkB;AAAE,8GAAA,QAAQ,OAAqB;AAAE,2GAAA,KAAK,OAAkB;AAAE,6GAAA,OAAO,OAAoB;AAMrH,uEACoD;AAD3C,yGAAA,KAAK,OAAiB;AAAE,4GAAA,QAAQ,OAAoB;AAAE,yGAAA,KAAK,OAAiB;AAAE,2GAAA,OAAO,OAAmB;AAMjH,yEACqD;AAD5C,2GAAA,KAAK,OAAkB;AAAE,8GAAA,QAAQ,OAAqB;AAAE,2GAAA,KAAK,OAAkB;AAAE,6GAAA,OAAO,OAAoB"}
|