Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
228bc88d60 | |||
811041b036 | |||
a1203366d7 | |||
0deb77cda8 |
@ -26,16 +26,28 @@ mirror:
|
|||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
audit:
|
auditProductionDependencies:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci command npm install --production --ignore-scripts
|
||||||
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
- npmci command npm audit --audit-level=high --only=prod --production
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
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 npm prepare
|
||||||
- npmci command npm install --ignore-scripts
|
- 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
|
- npmci command npm audit --audit-level=high --only=dev
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# test stage
|
# test stage
|
||||||
|
3069
package-lock.json
generated
3069
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartdns",
|
"name": "@pushrocks/smartdns",
|
||||||
"version": "4.0.5",
|
"version": "4.0.7",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "smart dns methods written in TypeScript",
|
"description": "smart dns methods written in TypeScript",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -28,8 +28,7 @@
|
|||||||
"@pushrocks/smartdelay": "^2.0.10",
|
"@pushrocks/smartdelay": "^2.0.10",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartrequest": "^1.1.47",
|
"@pushrocks/smartrequest": "^1.1.47",
|
||||||
"@tsclass/tsclass": "^3.0.21",
|
"@tsclass/tsclass": "^3.0.21"
|
||||||
"dns2": "^1.4.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.24",
|
"@gitzone/tsbuild": "^2.1.24",
|
||||||
|
@ -13,10 +13,3 @@ export { smartdelay, smartpromise, smartrequest };
|
|||||||
import * as tsclass from '@tsclass/tsclass';
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
export { tsclass };
|
export { tsclass };
|
||||||
|
|
||||||
// third party scope
|
|
||||||
import dns2 from 'dns2';
|
|
||||||
|
|
||||||
export {
|
|
||||||
dns2
|
|
||||||
}
|
|
||||||
|
@ -24,8 +24,6 @@ export class Smartdns {
|
|||||||
public dnsServerIp: string;
|
public dnsServerIp: string;
|
||||||
public dnsServerPort: number;
|
public dnsServerPort: number;
|
||||||
|
|
||||||
public dns2 = new plugins.dns2();
|
|
||||||
|
|
||||||
public dnsTypeMap: { [key: string]: number } = {
|
public dnsTypeMap: { [key: string]: number } = {
|
||||||
A: 1,
|
A: 1,
|
||||||
AAAA: 28,
|
AAAA: 28,
|
||||||
@ -67,8 +65,6 @@ export class Smartdns {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
await plugins.smartdelay.delayFor(intervalArg);
|
await plugins.smartdelay.delayFor(intervalArg);
|
||||||
// lets try backup strategy
|
|
||||||
const backupResult = this.dns2[`resolve${recordTypeArg}`]('google.com')
|
|
||||||
return await doCheck();
|
return await doCheck();
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
Reference in New Issue
Block a user