fix(core): update
This commit is contained in:
parent
90c9bfc906
commit
fe2f45e3a9
4
.gitignore
vendored
4
.gitignore
vendored
@ -15,8 +15,6 @@ node_modules/
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_web/
|
||||
dist_serve/
|
||||
dist_ts_web/
|
||||
dist_*/
|
||||
|
||||
# custom
|
@ -24,13 +24,14 @@ mirror:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
snyk:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:snyk
|
||||
audit:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command snyk test
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
|
@ -45,11 +45,12 @@
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_web/**/*",
|
||||
"dist_*/**/*",
|
||||
"dist_ts/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
}
|
||||
}
|
21
readme.md
21
readme.md
@ -8,13 +8,20 @@ easy cloudflare management
|
||||
* [docs (typedoc)](https://mojoio.gitlab.io/cloudflare/)
|
||||
|
||||
## Status for master
|
||||
[](https://gitlab.com/mojoio/cloudflare/commits/master)
|
||||
[](https://gitlab.com/mojoio/cloudflare/commits/master)
|
||||
[](https://www.npmjs.com/package/@mojoio/cloudflare)
|
||||
[](https://snyk.io/test/npm/@mojoio/cloudflare)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://prettier.io/)
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -47,10 +47,7 @@ export class CloudflareAccount {
|
||||
if (filteredResponse.length >= 1) {
|
||||
return filteredResponse[0].id;
|
||||
} else {
|
||||
logger.log(
|
||||
'error',
|
||||
`the domain ${domainName} does not appear to be in this account!`
|
||||
);
|
||||
logger.log('error', `the domain ${domainName} does not appear to be in this account!`);
|
||||
throw new Error(`the domain ${domainName} does not appear to be in this account!`);
|
||||
}
|
||||
},
|
||||
|
@ -1,5 +1,3 @@
|
||||
import * as plugins from './cloudflare.plugins';
|
||||
|
||||
export class CloudflareRecord {
|
||||
|
||||
}
|
||||
export class CloudflareRecord {}
|
||||
|
@ -47,5 +47,4 @@ export class CloudflareZone implements interfaces.ICflareZone {
|
||||
paused: boolean;
|
||||
type: string;
|
||||
checked_on: string;
|
||||
|
||||
}
|
||||
|
@ -14,14 +14,14 @@ export class ZoneManager {
|
||||
public async getZones(zoneName: string) {
|
||||
let requestRoute = `/zones?per_page=50`;
|
||||
// may be optionally filtered by domain name
|
||||
|
||||
|
||||
if (zoneName) {
|
||||
requestRoute = `${requestRoute}&name=${zoneName}`;
|
||||
}
|
||||
|
||||
const response: any = await this.cfAccount.request('GET', requestRoute);
|
||||
const apiObjects: interfaces.ICflareZone[] = response.result;
|
||||
|
||||
|
||||
const cloudflareZoneArray = [];
|
||||
for (const apiObject of apiObjects) {
|
||||
cloudflareZoneArray.push(CloudflareZone.createFromApiObject(apiObject));
|
||||
|
@ -1,3 +1,3 @@
|
||||
import * as plugins from './cloudflare.plugins';
|
||||
|
||||
export const logger = new plugins.smartlog.ConsoleLog();
|
||||
export const logger = new plugins.smartlog.ConsoleLog();
|
||||
|
Loading…
x
Reference in New Issue
Block a user