fix(core): update

This commit is contained in:
Philipp Kunz 2020-06-10 05:15:22 +00:00
parent a4e280f9f0
commit 4f9e81f612
5 changed files with 3708 additions and 498 deletions

4171
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,11 +3,11 @@
"version": "5.0.4",
"private": false,
"description": "easy cloudflare management",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"scripts": {
"test": "(tstest test/)",
"build": "(tsbuild)"
"build": "(tsbuild --web)"
},
"repository": {
"type": "git",
@ -24,21 +24,21 @@
},
"homepage": "https://gitlab.com/pushrocks/cflare#readme",
"dependencies": {
"@pushrocks/smartdelay": "^2.0.6",
"@pushrocks/smartlog": "^2.0.21",
"@pushrocks/smartdelay": "^2.0.9",
"@pushrocks/smartlog": "^2.0.28",
"@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartrequest": "^1.1.47",
"@pushrocks/smartstring": "^3.0.18",
"@tsclass/tsclass": "^3.0.7"
"@tsclass/tsclass": "^3.0.17"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.17",
"@gitzone/tsrun": "^1.2.8",
"@gitzone/tstest": "^1.0.28",
"@pushrocks/qenv": "^4.0.6",
"@pushrocks/tapbundle": "^3.2.0",
"@types/node": "^13.7.2",
"tslint": "^6.0.0",
"@gitzone/tsbuild": "^2.1.24",
"@gitzone/tsrun": "^1.2.12",
"@gitzone/tstest": "^1.0.33",
"@pushrocks/qenv": "^4.0.10",
"@pushrocks/tapbundle": "^3.2.1",
"@types/node": "^14.0.13",
"tslint": "^6.1.2",
"tslint-config-prettier": "^1.18.0"
},
"files": [

View File

@ -1,4 +1,5 @@
import plugins = require('./cloudflare.plugins');
import { logger } from './cloudflare.logger';
import * as interfaces from './interfaces';
// interfaces
@ -46,7 +47,7 @@ export class CloudflareAccount {
if (filteredResponse.length >= 1) {
return filteredResponse[0].id;
} else {
plugins.smartlog.defaultLogger.log(
logger.log(
'error',
`the domain ${domainName} does not appear to be in this account!`
);

View File

@ -1,6 +1,7 @@
import * as plugins from './cloudflare.plugins';
import * as interfaces from './interfaces';
import { WorkerManager } from './cloudflare.classes.workermanager';
import { logger } from './cloudflare.logger';
export interface IWorkerRoute extends interfaces.ICflareWorkerRoute {
zoneName: string;
@ -66,7 +67,7 @@ export class CloudflareWorker {
routeIdForUpdate = existingRoute.id;
if (existingRoute.script === this.id) {
routeStatus = 'alreadyUpToDate';
plugins.smartlog.defaultLogger.log('info', `route already exists, no update needed`);
logger.log('info', `route already exists, no update needed`);
}
}
}

3
ts/cloudflare.logger.ts Normal file
View File

@ -0,0 +1,3 @@
import * as plugins from './cloudflare.plugins';
export const logger = new plugins.smartlog.ConsoleLog();