diff --git a/components/amorphic/HISTORY.md b/components/amorphic/HISTORY.md index 6b98761c..4ff47207 100644 --- a/components/amorphic/HISTORY.md +++ b/components/amorphic/HISTORY.md @@ -1,3 +1,5 @@ +## 11.0.0 +* target es2020 ## 10.3.0 * Add validator middleware to express server, config settings for whitelist, blacklist, escape ## 10.2.1 diff --git a/components/amorphic/lib/typescript.js b/components/amorphic/lib/typescript.js index f13b5896..8261ee8a 100644 --- a/components/amorphic/lib/typescript.js +++ b/components/amorphic/lib/typescript.js @@ -35,10 +35,10 @@ function bindDecorators (objectTemplate) { */ this.Supertype = function Supertype() { if (objectTemplate.Supertype) { - return objectTemplate.Supertype.call(this, objectTemplate); + return Reflect.construct( objectTemplate.Supertype, [objectTemplate], this.constructor ); } else { - return SupertypeDefinition.Supertype.call(this, objectTemplate); + return Reflect.construct( SupertypeDefinition.Supertype, [objectTemplate], this.constructor ); } }; this.Supertype.prototype = SupertypeDefinition.Supertype.prototype; diff --git a/components/amorphic/package-lock.json b/components/amorphic/package-lock.json index 7a823c16..cfad2f2e 100644 --- a/components/amorphic/package-lock.json +++ b/components/amorphic/package-lock.json @@ -1,16 +1,16 @@ { "name": "@haventech/amorphic", - "version": "10.3.0", + "version": "11.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@haventech/amorphic", - "version": "10.3.0", + "version": "11.0.0", "dependencies": { - "@haventech/persistor": "8.x", - "@haventech/semotus": "6.x", - "@haventech/supertype": "^5.0.0", + "@haventech/persistor": "9.0.0-beta.2", + "@haventech/semotus": "7.0.0-beta.3", + "@haventech/supertype": "6.0.0-beta.4", "amorphic-bindster": "2.0.*", "compression": "1.7.4", "cookie-parser": "1.4.6", @@ -419,9 +419,9 @@ "integrity": "sha512-j1NL+wUz9u3rC4IbIiNk6Wn0ObDG5Oh/LpNgGgMWNmE31YQgrg4Qf0lqZLHzd8lMTrB8eBd/ryJaUkok99aCBQ==" }, "node_modules/@haventech/persistor": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@haventech/persistor/-/persistor-8.0.0.tgz", - "integrity": "sha512-nh46vCZ03kdwAOUgKCHPYnHrCVUVF7QUmaj4OmD++yQ4nXYLPqhh4uFd1nfFyKcxsB56Wp4XFqWlaAJXIVcOAQ==", + "version": "9.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@haventech/persistor/-/persistor-9.0.0-beta.2.tgz", + "integrity": "sha512-DYKFR0/iyMZU6HEVWHWXOcq9aE4Zlaz116svdREXou8sZ4WcyQ1ws0XX1NTExJLAoqF/7ciygC6gR2f2EtJ91A==", "dependencies": { "aws-sdk": "2.x", "bluebird": "x", @@ -437,7 +437,7 @@ "node": ">=14.x" }, "peerDependencies": { - "@haventech/supertype": "5.x" + "@haventech/supertype": "6.0.0-beta.4" } }, "node_modules/@haventech/persistor/node_modules/uuid": { @@ -449,9 +449,9 @@ } }, "node_modules/@haventech/semotus": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@haventech/semotus/-/semotus-6.0.0.tgz", - "integrity": "sha512-/bazO9K82bcK+LQqqWzlSUrtJ5WSSGS2Zlaclu2bxwTgt/n2jvqQtOipFkhCqrWxhvNXIoSSU6dbUGlvg/4Spw==", + "version": "7.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@haventech/semotus/-/semotus-7.0.0-beta.3.tgz", + "integrity": "sha512-MYdBz0Dq1YVurhQTADdtxcWhOltgVYg5U10ds7t+C0vG1+NiDlZUqTSUzJPSXYvu1lJSZpQxOTNIRq/ssgtACA==", "dependencies": { "q": "1.x" }, @@ -459,49 +459,22 @@ "node": ">=14.0.0" }, "peerDependencies": { - "@haventech/supertype": "5.x" + "@haventech/supertype": "6.0.0-beta.4" } }, "node_modules/@haventech/supertype": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@haventech/supertype/-/supertype-5.0.0.tgz", - "integrity": "sha512-nlnzXeoiQkhQ0s29nkoOdBTQPHOI7fAx4Qy5Lrrgje3iuLwMZmAt7AnvbIgqr+kWaKSZ9jJ/AIzHI6+rnjgxRw==", + "version": "6.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@haventech/supertype/-/supertype-6.0.0-beta.4.tgz", + "integrity": "sha512-wvN9H/A/B8OexbT/HQJyXXejfS67ueEwonSFPiMdbWNJFz8xQnsyPFC1LzRH/Thv84y9VwsV7i2M4U4i0BNv2w==", "dependencies": { "@haventech/amorphic-contracts": "^0.2.0", - "nconf": "^0.11.0", + "nconf": "^0.12.0", "reflect-metadata": "^0.1.12" }, "engines": { "node": ">=14.x" } }, - "node_modules/@haventech/supertype/node_modules/async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==" - }, - "node_modules/@haventech/supertype/node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/@haventech/supertype/node_modules/nconf": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.11.4.tgz", - "integrity": "sha512-YaDR846q11JnG1vTrhJ0QIlhiGY6+W1bgWtReG9SS3vkTl3AoNwFvUItdhG6/ZjGCfWpUVuRTNEBTDAQ3nWhGw==", - "dependencies": { - "async": "^1.4.0", - "ini": "^2.0.0", - "secure-keys": "^1.0.0", - "yargs": "^16.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", @@ -7491,9 +7464,9 @@ "integrity": "sha512-j1NL+wUz9u3rC4IbIiNk6Wn0ObDG5Oh/LpNgGgMWNmE31YQgrg4Qf0lqZLHzd8lMTrB8eBd/ryJaUkok99aCBQ==" }, "@haventech/persistor": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@haventech/persistor/-/persistor-8.0.0.tgz", - "integrity": "sha512-nh46vCZ03kdwAOUgKCHPYnHrCVUVF7QUmaj4OmD++yQ4nXYLPqhh4uFd1nfFyKcxsB56Wp4XFqWlaAJXIVcOAQ==", + "version": "9.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@haventech/persistor/-/persistor-9.0.0-beta.2.tgz", + "integrity": "sha512-DYKFR0/iyMZU6HEVWHWXOcq9aE4Zlaz116svdREXou8sZ4WcyQ1ws0XX1NTExJLAoqF/7ciygC6gR2f2EtJ91A==", "requires": { "aws-sdk": "2.x", "bluebird": "x", @@ -7514,44 +7487,21 @@ } }, "@haventech/semotus": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@haventech/semotus/-/semotus-6.0.0.tgz", - "integrity": "sha512-/bazO9K82bcK+LQqqWzlSUrtJ5WSSGS2Zlaclu2bxwTgt/n2jvqQtOipFkhCqrWxhvNXIoSSU6dbUGlvg/4Spw==", + "version": "7.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@haventech/semotus/-/semotus-7.0.0-beta.3.tgz", + "integrity": "sha512-MYdBz0Dq1YVurhQTADdtxcWhOltgVYg5U10ds7t+C0vG1+NiDlZUqTSUzJPSXYvu1lJSZpQxOTNIRq/ssgtACA==", "requires": { "q": "1.x" } }, "@haventech/supertype": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@haventech/supertype/-/supertype-5.0.0.tgz", - "integrity": "sha512-nlnzXeoiQkhQ0s29nkoOdBTQPHOI7fAx4Qy5Lrrgje3iuLwMZmAt7AnvbIgqr+kWaKSZ9jJ/AIzHI6+rnjgxRw==", + "version": "6.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@haventech/supertype/-/supertype-6.0.0-beta.4.tgz", + "integrity": "sha512-wvN9H/A/B8OexbT/HQJyXXejfS67ueEwonSFPiMdbWNJFz8xQnsyPFC1LzRH/Thv84y9VwsV7i2M4U4i0BNv2w==", "requires": { "@haventech/amorphic-contracts": "^0.2.0", - "nconf": "^0.11.0", + "nconf": "^0.12.0", "reflect-metadata": "^0.1.12" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==" - }, - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" - }, - "nconf": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.11.4.tgz", - "integrity": "sha512-YaDR846q11JnG1vTrhJ0QIlhiGY6+W1bgWtReG9SS3vkTl3AoNwFvUItdhG6/ZjGCfWpUVuRTNEBTDAQ3nWhGw==", - "requires": { - "async": "^1.4.0", - "ini": "^2.0.0", - "secure-keys": "^1.0.0", - "yargs": "^16.1.1" - } - } } }, "@humanwhocodes/config-array": { diff --git a/components/amorphic/package.json b/components/amorphic/package.json index c27c7a15..605cb4a6 100644 --- a/components/amorphic/package.json +++ b/components/amorphic/package.json @@ -4,11 +4,11 @@ "homepage": "https://github.com/haven-life/amorphic", "main": "dist/index.js", "types": "dist/index.d.ts", - "version": "10.3.0", + "version": "11.0.0", "dependencies": { - "@haventech/persistor": "8.x", - "@haventech/semotus": "6.x", - "@haventech/supertype": "^5.0.0", + "@haventech/persistor": "9.0.0-beta.2", + "@haventech/semotus": "7.0.0-beta.3", + "@haventech/supertype": "6.0.0-beta.4", "amorphic-bindster": "2.0.*", "compression": "1.7.4", "cookie-parser": "1.4.6", diff --git a/components/amorphic/test/V2/amorphic.js b/components/amorphic/test/V2/amorphic.js index 8998d1cc..cf26802d 100644 --- a/components/amorphic/test/V2/amorphic.js +++ b/components/amorphic/test/V2/amorphic.js @@ -21,6 +21,7 @@ function beforeEachDescribe(done, appName, createControllerFor, sourceMode) { describe('toClient and toServer testing', function() { before(function(done) { + this.timeout(5000); return beforeEachDescribe(done, 'app2', 'yes', 'debug'); }); after(afterEachDescribe); diff --git a/components/amorphic/tsconfig.json b/components/amorphic/tsconfig.json index 913b31b8..3ebfcb7a 100644 --- a/components/amorphic/tsconfig.json +++ b/components/amorphic/tsconfig.json @@ -5,8 +5,9 @@ ], "compilerOptions": { "module": "commonjs", - "target": "es5", + "target": "es2020", "lib": [ + "es2020", "dom", "es5", "es2015.promise"