diff --git a/package-lock.json b/package-lock.json index 9be9eb9e..566cd4ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "augment-vir", - "version": "21.2.0", + "version": "21.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "augment-vir", - "version": "21.2.0", + "version": "21.3.0", "license": "(MIT or CC0 1.0)", "workspaces": [ "./packages/*" @@ -5881,9 +5881,9 @@ "dev": true }, "node_modules/element-vir": { - "version": "16.4.7", - "resolved": "https://registry.npmjs.org/element-vir/-/element-vir-16.4.7.tgz", - "integrity": "sha512-0qd7BhrYwe5XWoR7ysaVZIxT8HYUuSdVjI6wz3203BRXxvjw7S/33JA0JENyB63OjWx/dasmSSyHlZ91OuAqgw==", + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/element-vir/-/element-vir-16.5.0.tgz", + "integrity": "sha512-BaxGOj1yyMk/oR4Gmi18f9ZJfl6noLL3jlNzZUGh/HLm6t2Cx6QQt9m0SK+d2uaLPjJeuGQ+Y7XBIIFwAXZAnA==", "dependencies": { "@augment-vir/common": "^20.0.1", "lit": "^2.8.0", @@ -14506,15 +14506,15 @@ }, "packages/browser": { "name": "@augment-vir/browser", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "dependencies": { - "@augment-vir/common": "^21.1.0", + "@augment-vir/common": "^21.2.0", "element-vir": "^16.4.7", "html-spec-tags": "^1.0.0" }, "devDependencies": { - "@augment-vir/browser-testing": "^21.1.0", + "@augment-vir/browser-testing": "^21.2.0", "@open-wc/testing": "^3.2.0", "@types/chai": "^4.3.8", "@types/mocha": "^10.0.2", @@ -14531,11 +14531,11 @@ }, "packages/browser-testing": { "name": "@augment-vir/browser-testing", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "dependencies": { - "@augment-vir/common": "^21.1.0", - "@augment-vir/testing": "^21.1.0", + "@augment-vir/common": "^21.2.0", + "@augment-vir/testing": "^21.2.0", "@open-wc/testing": "^3.2.0", "@types/mocha": "^10.0.2", "@web/test-runner-commands": "^0.8.1", @@ -14575,11 +14575,11 @@ }, "packages/chai": { "name": "@augment-vir/chai", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "dependencies": { - "@augment-vir/common": "^21.1.0", - "@augment-vir/testing": "^21.1.0", + "@augment-vir/common": "^21.2.0", + "@augment-vir/testing": "^21.2.0", "type-fest": "^4.4.0" }, "devDependencies": { @@ -14602,7 +14602,7 @@ }, "packages/common": { "name": "@augment-vir/common", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "dependencies": { "browser-or-node": "^2.1.1", @@ -14614,12 +14614,12 @@ }, "packages/common-tests": { "name": "@augment-vir/common-tests", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "devDependencies": { - "@augment-vir/chai": "^21.1.0", - "@augment-vir/common": "^21.1.0", - "@augment-vir/node-js": "^21.1.0", + "@augment-vir/chai": "^21.2.0", + "@augment-vir/common": "^21.2.0", + "@augment-vir/node-js": "^21.2.0", "@electrovir/nyc": "^15.1.0-fix0", "@istanbuljs/nyc-config-typescript": "^1.0.2", "@types/chai": "^4.3.8", @@ -14659,11 +14659,11 @@ }, "packages/docker": { "name": "@augment-vir/docker", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "dependencies": { - "@augment-vir/common": "^21.1.0", - "@augment-vir/node-js": "^21.1.0" + "@augment-vir/common": "^21.2.0", + "@augment-vir/node-js": "^21.2.0" }, "devDependencies": { "typescript": "^5.2.2" @@ -14671,10 +14671,10 @@ }, "packages/node-js": { "name": "@augment-vir/node-js", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "dependencies": { - "@augment-vir/common": "^21.1.0", + "@augment-vir/common": "^21.2.0", "ansi-colors": "^4.1.3", "axios": "^1.5.1", "fs-extra": "^11.1.1", @@ -14682,7 +14682,7 @@ "type-fest": "^4.4.0" }, "devDependencies": { - "@augment-vir/chai": "^21.1.0", + "@augment-vir/chai": "^21.2.0", "@electrovir/nyc": "^15.1.0-fix0", "@istanbuljs/nyc-config-typescript": "^1.0.2", "@types/chai": "^4.3.8", @@ -14711,11 +14711,11 @@ }, "packages/prisma-node-js": { "name": "@augment-vir/prisma-node-js", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "dependencies": { - "@augment-vir/common": "^21.1.0", - "@augment-vir/node-js": "^21.1.0" + "@augment-vir/common": "^21.2.0", + "@augment-vir/node-js": "^21.2.0" }, "devDependencies": { "istanbul-smart-text-reporter": "^1.1.2", @@ -14724,11 +14724,11 @@ }, "packages/scripts": { "name": "@augment-vir/scripts", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "dependencies": { - "@augment-vir/common": "^21.1.0", - "@augment-vir/node-js": "^21.1.0" + "@augment-vir/common": "^21.2.0", + "@augment-vir/node-js": "^21.2.0" }, "devDependencies": { "@electrovir/nyc": "^15.1.0-fix0", @@ -14759,10 +14759,10 @@ }, "packages/testing": { "name": "@augment-vir/testing", - "version": "21.2.0", + "version": "21.3.0", "license": "MIT", "dependencies": { - "@augment-vir/common": "^21.1.0", + "@augment-vir/common": "^21.2.0", "expect-type": "^0.15.0", "type-fest": "^4.4.0" }, diff --git a/package.json b/package.json index 9ed7d11e..dc8f34d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "augment-vir", - "version": "21.2.0", + "version": "21.3.0", "private": true, "homepage": "https://github.com/electrovir/augment-vir", "bugs": { diff --git a/packages/browser-testing/package.json b/packages/browser-testing/package.json index dda2157c..78d2d69d 100644 --- a/packages/browser-testing/package.json +++ b/packages/browser-testing/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/browser-testing", - "version": "21.2.0", + "version": "21.3.0", "homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common", "bugs": { "url": "https://github.com/electrovir/augment-vir/issues" @@ -23,8 +23,8 @@ "test:coverage": "npm test" }, "dependencies": { - "@augment-vir/common": "^21.2.0", - "@augment-vir/testing": "^21.2.0", + "@augment-vir/common": "^21.3.0", + "@augment-vir/testing": "^21.3.0", "@open-wc/testing": "^3.2.0", "@types/mocha": "^10.0.2", "@web/test-runner-commands": "^0.8.1", diff --git a/packages/browser/package.json b/packages/browser/package.json index 69ca2a12..a9b76602 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/browser", - "version": "21.2.0", + "version": "21.3.0", "homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/browser", "bugs": { "url": "https://github.com/electrovir/augment-vir/issues" @@ -24,12 +24,12 @@ "test:watch": "web-test-runner --color --config configs/web-test-runner.config.mjs --watch" }, "dependencies": { - "@augment-vir/common": "^21.2.0", + "@augment-vir/common": "^21.3.0", "element-vir": "^16.4.7", "html-spec-tags": "^1.0.0" }, "devDependencies": { - "@augment-vir/browser-testing": "^21.2.0", + "@augment-vir/browser-testing": "^21.3.0", "@open-wc/testing": "^3.2.0", "@types/chai": "^4.3.8", "@types/mocha": "^10.0.2", diff --git a/packages/chai/package.json b/packages/chai/package.json index d5cffb9b..0d67a8d3 100644 --- a/packages/chai/package.json +++ b/packages/chai/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/chai", - "version": "21.2.0", + "version": "21.3.0", "homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common", "bugs": { "url": "https://github.com/electrovir/augment-vir/issues" @@ -23,8 +23,8 @@ "test:coverage": "npm test" }, "dependencies": { - "@augment-vir/common": "^21.2.0", - "@augment-vir/testing": "^21.2.0", + "@augment-vir/common": "^21.3.0", + "@augment-vir/testing": "^21.3.0", "type-fest": "^4.4.0" }, "devDependencies": { diff --git a/packages/common-tests/package.json b/packages/common-tests/package.json index 168bb110..352ce010 100644 --- a/packages/common-tests/package.json +++ b/packages/common-tests/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/common-tests", - "version": "21.2.0", + "version": "21.3.0", "private": true, "homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common-tests", "bugs": { @@ -22,9 +22,9 @@ "test:types": "tsc --noEmit" }, "devDependencies": { - "@augment-vir/chai": "^21.2.0", - "@augment-vir/common": "^21.2.0", - "@augment-vir/node-js": "^21.2.0", + "@augment-vir/chai": "^21.3.0", + "@augment-vir/common": "^21.3.0", + "@augment-vir/node-js": "^21.3.0", "@electrovir/nyc": "^15.1.0-fix0", "@istanbuljs/nyc-config-typescript": "^1.0.2", "@types/chai": "^4.3.8", diff --git a/packages/common/package.json b/packages/common/package.json index 813c469e..bd35f742 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/common", - "version": "21.2.0", + "version": "21.3.0", "homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common", "bugs": { "url": "https://github.com/electrovir/augment-vir/issues" diff --git a/packages/common/src/augments/number.ts b/packages/common/src/augments/number.ts index 99a82e16..e539fce6 100644 --- a/packages/common/src/augments/number.ts +++ b/packages/common/src/augments/number.ts @@ -7,3 +7,13 @@ export function toEnsuredNumber(input: any): number { return numeric; } } + +export function wrapNumber({max, min, value}: {value: number; max: number; min: number}): number { + if (value > max) { + return min; + } else if (value < min) { + return max; + } + + return value; +} diff --git a/packages/docker/package.json b/packages/docker/package.json index b899e8be..4d58639e 100644 --- a/packages/docker/package.json +++ b/packages/docker/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/docker", - "version": "21.2.0", + "version": "21.3.0", "homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/docker", "bugs": { "url": "https://github.com/electrovir/augment-vir/issues" @@ -22,8 +22,8 @@ "test:coverage": "npm test" }, "dependencies": { - "@augment-vir/common": "^21.2.0", - "@augment-vir/node-js": "^21.2.0" + "@augment-vir/common": "^21.3.0", + "@augment-vir/node-js": "^21.3.0" }, "devDependencies": { "typescript": "^5.2.2" diff --git a/packages/node-js/package.json b/packages/node-js/package.json index 6aadf7d5..e83c88c0 100644 --- a/packages/node-js/package.json +++ b/packages/node-js/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/node-js", - "version": "21.2.0", + "version": "21.3.0", "homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/node-js", "bugs": { "url": "https://github.com/electrovir/augment-vir/issues" @@ -22,7 +22,7 @@ "test:coverage": "npm test coverage" }, "dependencies": { - "@augment-vir/common": "^21.2.0", + "@augment-vir/common": "^21.3.0", "ansi-colors": "^4.1.3", "axios": "^1.5.1", "fs-extra": "^11.1.1", @@ -30,7 +30,7 @@ "type-fest": "^4.4.0" }, "devDependencies": { - "@augment-vir/chai": "^21.2.0", + "@augment-vir/chai": "^21.3.0", "@electrovir/nyc": "^15.1.0-fix0", "@istanbuljs/nyc-config-typescript": "^1.0.2", "@types/chai": "^4.3.8", diff --git a/packages/prisma-node-js/package.json b/packages/prisma-node-js/package.json index 5098cd51..cadd158c 100644 --- a/packages/prisma-node-js/package.json +++ b/packages/prisma-node-js/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/prisma-node-js", - "version": "21.2.0", + "version": "21.3.0", "homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/prisma-node-js", "bugs": { "url": "https://github.com/electrovir/augment-vir/issues" @@ -22,8 +22,8 @@ "test:coverage": "npm test" }, "dependencies": { - "@augment-vir/common": "^21.2.0", - "@augment-vir/node-js": "^21.2.0" + "@augment-vir/common": "^21.3.0", + "@augment-vir/node-js": "^21.3.0" }, "devDependencies": { "istanbul-smart-text-reporter": "^1.1.2", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index f2360751..f24eff88 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/scripts", - "version": "21.2.0", + "version": "21.3.0", "private": true, "license": "MIT", "author": { @@ -14,8 +14,8 @@ "verify": "ts-node src/index.ts" }, "dependencies": { - "@augment-vir/common": "^21.2.0", - "@augment-vir/node-js": "^21.2.0" + "@augment-vir/common": "^21.3.0", + "@augment-vir/node-js": "^21.3.0" }, "devDependencies": { "@electrovir/nyc": "^15.1.0-fix0", diff --git a/packages/testing/package.json b/packages/testing/package.json index 37822f6a..8f0ac918 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/testing", - "version": "21.2.0", + "version": "21.3.0", "homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/testing", "bugs": { "url": "https://github.com/electrovir/augment-vir/issues" @@ -23,7 +23,7 @@ "test:coverage": "npm test coverage" }, "dependencies": { - "@augment-vir/common": "^21.2.0", + "@augment-vir/common": "^21.3.0", "expect-type": "^0.15.0", "type-fest": "^4.4.0" },