fix(core): update

This commit is contained in:
Philipp Kunz 2023-03-27 23:13:37 +02:00
parent 8766f43366
commit f0e981e13e
9 changed files with 4569 additions and 11307 deletions

View File

@ -13,8 +13,13 @@ stages:
- metadata - metadata
before_script: before_script:
- npm install -g @shipzone/npmci - pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
# ==================== # ====================
# security stage # security stage
# ==================== # ====================
@ -22,11 +27,10 @@ auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm install --production --ignore-scripts - npmci command pnpm audit --audit-level=high --prod
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags: tags:
- lossless
- docker - docker
allow_failure: true allow_failure: true
@ -34,11 +38,10 @@ auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev - npmci command pnpm audit --audit-level=high --dev
tags: tags:
- lossless
- docker - docker
allow_failure: true allow_failure: true
@ -49,7 +52,6 @@ auditDevDependencies:
testStable: testStable:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -60,10 +62,9 @@ testStable:
testBuild: testBuild:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci command npm run build - npmci npm build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
@ -111,8 +112,7 @@ trigger:
pages: pages:
stage: metadata stage: metadata
script: script:
- npmci node install stable - npmci node install stable
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command npm run buildDocs - npmci command npm run buildDocs
tags: tags:

11282
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
"@gitzone/tsdoc": "^1.1.10", "@gitzone/tsdoc": "^1.1.10",
"@gitzone/tstest": "^1.0.44", "@gitzone/tstest": "^1.0.44",
"@pushrocks/tapbundle": "^5.0.3", "@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^17.0.41" "@types/node": "^18.15.10"
}, },
"dependencies": { "dependencies": {
"@types/validator": "^13.7.4", "@types/validator": "^13.7.4",
@ -40,4 +40,4 @@
"npmextra.json", "npmextra.json",
"readme.md" "readme.md"
] ]
} }

4544
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,6 @@ Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](htt
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartvalidator)](https://lossless.cloud) PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartvalidator)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartvalidator)](https://lossless.cloud) PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartvalidator)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartvalidator)](https://lossless.cloud) BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartvalidator)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage ## Usage
@ -33,7 +32,6 @@ We are always happy for code contributions. If you are not the code contributing
For further information read the linked docs at the top of this readme. For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) ## Legal
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -8,6 +8,10 @@ tap.test('first test', async () => {
expect(testValidator).toBeInstanceOf(smartvalidator.SmartValidator); expect(testValidator).toBeInstanceOf(smartvalidator.SmartValidator);
}); });
tap.test('should check for being a URL', async () => {
expect(testValidator.isUrl('lossless.com')).toBeTrue();
})
tap.test('should check an IBAN', async () => { tap.test('should check an IBAN', async () => {
expect(testValidator.isIban('AT95 0100 0000 0555 4915')).toBeTrue(); expect(testValidator.isIban('AT95 0100 0000 0555 4915')).toBeTrue();
}); });
@ -15,6 +19,6 @@ tap.test('should check an IBAN', async () => {
tap.test('escape email', async () => { tap.test('escape email', async () => {
const escapedEmail = testValidator.escape('test@example.com'); const escapedEmail = testValidator.escape('test@example.com');
console.log(escapedEmail); console.log(escapedEmail);
}) });
tap.start(); tap.start();

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/smartvalidator', name: '@pushrocks/smartvalidator',
version: '1.0.4', version: '1.0.5',
description: 'a wrapper for the validator package to perform validations' description: 'a wrapper for the validator package to perform validations'
} }

View File

@ -20,7 +20,7 @@ export class SmartValidator {
/** /**
* might be buggy. TODO: Improve. * might be buggy. TODO: Improve.
* @param stringArg * @param stringArg
* @returns * @returns
*/ */
public isCsv(stringArg: string) { public isCsv(stringArg: string) {
return stringArg.split(',').length > 4 || stringArg.split(';').length > 4; return stringArg.split(',').length > 4 || stringArg.split(';').length > 4;

View File

@ -2,6 +2,4 @@ import validatorMod from 'validator';
const validator: typeof validatorMod.default = validatorMod as any; const validator: typeof validatorMod.default = validatorMod as any;
export { export { validator };
validator
}