fix(core): update
This commit is contained in:
parent
c92ece79ff
commit
95d5c6ceee
@ -34,31 +34,6 @@ snyk:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
sast:
|
||||
stage: security
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
||||
- docker run
|
||||
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
|
||||
--volume "$PWD:/code"
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
|
||||
artifacts:
|
||||
reports:
|
||||
sast: gl-sast-report.json
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
# ====================
|
||||
|
36
README.md
36
README.md
@ -1,25 +1,20 @@
|
||||
# smartstring
|
||||
|
||||
# @pushrocks/smartstring
|
||||
handle strings in smart ways. TypeScript ready.
|
||||
|
||||
## Availabililty
|
||||
|
||||
[](https://www.npmjs.com/package/smartstring)
|
||||
[](https://GitLab.com/pushrocks/smartstring)
|
||||
[](https://github.com/pushrocks/smartstring)
|
||||
[](https://pushrocks.gitlab.io/smartstring/)
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartstring)
|
||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartstring)
|
||||
* [github.com (source mirror)](https://github.com/pushrocks/smartstring)
|
||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartstring/)
|
||||
|
||||
## Status for master
|
||||
|
||||
[](https://GitLab.com/pushrocks/smartstring/commits/master)
|
||||
[](https://GitLab.com/pushrocks/smartstring/commits/master)
|
||||
[](https://www.npmjs.com/package/smartstring)
|
||||
[](https://david-dm.org/pushrocks/smartstring)
|
||||
[](https://www.bithound.io/github/pushrocks/smartstring/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/pushrocks/smartstring)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](http://standardjs.com/)
|
||||
[](https://gitlab.com/pushrocks/smartstring/commits/master)
|
||||
[](https://gitlab.com/pushrocks/smartstring/commits/master)
|
||||
[](https://www.npmjs.com/package/@pushrocks/smartstring)
|
||||
[](https://snyk.io/test/npm/@pushrocks/smartstring)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://prettier.io/)
|
||||
|
||||
## Usage
|
||||
|
||||
@ -63,8 +58,9 @@ smartstring.indent.indent('somestringanotherstring', '>>>> '); // indents a stri
|
||||
smartstring.indent.normalize(' somestring anotherstring', '>>>> '); // looks for the least amount of indention and removes superflouous space
|
||||
```
|
||||
|
||||
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)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
|
||||
[](https://push.rocks)
|
||||
[](https://maintainedby.lossless.com)
|
||||
|
@ -7,5 +7,15 @@
|
||||
"baseImage": "hosttoday/ht-docker-node:npmci",
|
||||
"command": "npmci node install stable && npmci npm install && npmci npm test",
|
||||
"dockerSock": false
|
||||
},
|
||||
"gitzone": {
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"gitrepo": "smartstring",
|
||||
"shortDescription": "handle strings in smart ways. TypeScript ready.",
|
||||
"npmPackagename": "@pushrocks/smartstring",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
@ -39,4 +39,4 @@
|
||||
"randomatic": "^3.1.1",
|
||||
"strip-indent": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
@ -6,14 +6,14 @@ tap.test('should normalize a string', async () => {
|
||||
const testString = `
|
||||
myawesome string;
|
||||
is indented with two spaces
|
||||
`
|
||||
`;
|
||||
const normalizedString = smartstring.normalize.standard(testString);
|
||||
expect(normalizedString).to.equal(
|
||||
`
|
||||
`
|
||||
myawesome string;
|
||||
is indented with two spaces
|
||||
`
|
||||
)
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
tap.start()
|
||||
tap.start();
|
||||
|
@ -2,12 +2,12 @@ import * as plugins from './smartstring.plugins';
|
||||
|
||||
/**
|
||||
* creates a random string
|
||||
*
|
||||
*
|
||||
* ```ts
|
||||
* createRandomString('AAAA')
|
||||
* //=> 'AGHR'
|
||||
* //=> 'AGHR'
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @param patternArg the pattern argument to use, Aa0!* are viable pattern descritors
|
||||
* @param lengthArg the length of the random string
|
||||
* @param optionsArg options
|
||||
|
@ -46,7 +46,7 @@ export class Domain {
|
||||
// helper functions
|
||||
|
||||
/** */
|
||||
private _domainRegex (stringArg: string) {
|
||||
private _domainRegex(stringArg: string) {
|
||||
const regexString = /([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}([a-zA-Z0-9\-\_]*)\.{0,1}$/;
|
||||
const regexMatches = regexString.exec(stringArg);
|
||||
regexMatches.reverse(); //make sure we build the domain from toplevel to subdomain (reversed order)
|
||||
@ -57,7 +57,7 @@ export class Domain {
|
||||
return regexMatchesFiltered;
|
||||
}
|
||||
|
||||
private _protocolRegex (stringArg: string) {
|
||||
private _protocolRegex(stringArg: string) {
|
||||
const regexString = /^([a-zA-Z0-9]*):\/\//;
|
||||
const regexMatches = regexString.exec(stringArg);
|
||||
if (regexMatches) {
|
||||
@ -67,7 +67,7 @@ export class Domain {
|
||||
}
|
||||
}
|
||||
|
||||
private _portRegex (stringArg: string) {
|
||||
private _portRegex(stringArg: string) {
|
||||
const regexString = /^([a-zA-Z0-9]*):\/\//;
|
||||
const regexMatches = regexString.exec(stringArg);
|
||||
if (regexMatches) {
|
||||
@ -76,5 +76,4 @@ export class Domain {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,10 +2,7 @@
|
||||
import * as crypto from 'crypto';
|
||||
import * as url from 'url';
|
||||
|
||||
export {
|
||||
crypto,
|
||||
url
|
||||
};
|
||||
export { crypto, url };
|
||||
|
||||
// third party
|
||||
export let jsBase64 = require('js-base64').Base64;
|
||||
@ -14,4 +11,3 @@ export let stripIndent = require('strip-indent');
|
||||
export let normalizeNewline = require('normalize-newline');
|
||||
export let randomatic = require('randomatic');
|
||||
export let cryptoRandomString = require('crypto-random-string');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user