Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
0248d52548 | |||
c3984819cc | |||
045b87a4a2 | |||
48ca9fdbb9 | |||
e466944c55 | |||
6d8deca9d4 | |||
a4518f3068 | |||
9e338354c6 |
@ -19,23 +19,35 @@ mirror:
|
|||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci git mirror
|
- npmci git mirror
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
- lossless
|
||||||
- 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:
|
||||||
- lossless
|
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
allow_failure: true
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# test stage
|
# test stage
|
||||||
@ -50,9 +62,7 @@ testStable:
|
|||||||
- npmci npm test
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
|
||||||
- docker
|
- docker
|
||||||
- priv
|
|
||||||
|
|
||||||
testBuild:
|
testBuild:
|
||||||
stage: test
|
stage: test
|
||||||
@ -63,9 +73,7 @@ testBuild:
|
|||||||
- npmci command npm run build
|
- npmci command npm run build
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
@ -85,6 +93,8 @@ release:
|
|||||||
codequality:
|
codequality:
|
||||||
stage: metadata
|
stage: metadata
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g tslint typescript
|
- npmci command npm install -g tslint typescript
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -15,7 +15,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"projectType": {
|
"projectType": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["website", "element", "service", "npm"]
|
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19396
package-lock.json
generated
19396
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/cloudflare",
|
"name": "@mojoio/cloudflare",
|
||||||
"version": "5.0.7",
|
"version": "6.0.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "easy cloudflare management",
|
"description": "easy cloudflare management",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/)",
|
"test": "(tstest test/)",
|
||||||
"build": "(tsbuild --web)"
|
"build": "(tsbuild --web --allowimplicitany)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -25,21 +26,19 @@
|
|||||||
"homepage": "https://gitlab.com/pushrocks/cflare#readme",
|
"homepage": "https://gitlab.com/pushrocks/cflare#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartdelay": "^2.0.10",
|
"@pushrocks/smartdelay": "^2.0.10",
|
||||||
"@pushrocks/smartlog": "^2.0.39",
|
"@pushrocks/smartlog": "^3.0.1",
|
||||||
"@pushrocks/smartpromise": "^3.1.3",
|
"@pushrocks/smartpromise": "^3.1.3",
|
||||||
"@pushrocks/smartrequest": "^1.1.51",
|
"@pushrocks/smartrequest": "^2.0.11",
|
||||||
"@pushrocks/smartstring": "^3.0.24",
|
"@pushrocks/smartstring": "^4.0.5",
|
||||||
"@tsclass/tsclass": "^3.0.29"
|
"@tsclass/tsclass": "^4.0.21"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.25",
|
"@gitzone/tsbuild": "^2.1.65",
|
||||||
"@gitzone/tsrun": "^1.2.12",
|
"@gitzone/tsrun": "^1.2.37",
|
||||||
"@gitzone/tstest": "^1.0.52",
|
"@gitzone/tstest": "^1.0.73",
|
||||||
"@pushrocks/qenv": "^4.0.10",
|
"@pushrocks/qenv": "^5.0.2",
|
||||||
"@pushrocks/tapbundle": "^3.2.9",
|
"@pushrocks/tapbundle": "^5.0.4",
|
||||||
"@types/node": "^14.14.22",
|
"@types/node": "^18.7.23"
|
||||||
"tslint": "^6.1.3",
|
|
||||||
"tslint-config-prettier": "^1.18.0"
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
@ -52,5 +51,8 @@
|
|||||||
"cli.js",
|
"cli.js",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
|
],
|
||||||
|
"browserslist": [
|
||||||
|
"last 1 chrome versions"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
27
test/test.ts
27
test/test.ts
@ -3,7 +3,7 @@ import { expect, tap } from '@pushrocks/tapbundle';
|
|||||||
// tslint:disable-next-line: no-implicit-dependencies
|
// tslint:disable-next-line: no-implicit-dependencies
|
||||||
import { Qenv } from '@pushrocks/qenv';
|
import { Qenv } from '@pushrocks/qenv';
|
||||||
|
|
||||||
import cloudflare = require('../ts/index');
|
import * as cloudflare from '../ts/index.js';
|
||||||
|
|
||||||
const testQenv = new Qenv(process.cwd(), process.cwd() + '/.nogit');
|
const testQenv = new Qenv(process.cwd(), process.cwd() + '/.nogit');
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ tap.test('should create a valid instance of CloudflareAccount', async () => {
|
|||||||
testCloudflareAccount = new cloudflare.CloudflareAccount(testQenv.getEnvVarOnDemand('CF_KEY'));
|
testCloudflareAccount = new cloudflare.CloudflareAccount(testQenv.getEnvVarOnDemand('CF_KEY'));
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('.listZones() -> should display an entire account', async tools => {
|
tap.test('.listZones() -> should display an entire account', async (tools) => {
|
||||||
tools.timeout(600000);
|
tools.timeout(600000);
|
||||||
const result = await testCloudflareAccount.convenience.listZones();
|
const result = await testCloudflareAccount.convenience.listZones();
|
||||||
console.log(result);
|
console.log(result);
|
||||||
@ -22,7 +22,7 @@ tap.test('.listZones() -> should display an entire account', async tools => {
|
|||||||
|
|
||||||
tap.test(
|
tap.test(
|
||||||
'.getZoneId(domainName) -> should get an Cloudflare Id for a domain string',
|
'.getZoneId(domainName) -> should get an Cloudflare Id for a domain string',
|
||||||
async tools => {
|
async (tools) => {
|
||||||
tools.timeout(600000);
|
tools.timeout(600000);
|
||||||
await testCloudflareAccount.convenience.getZoneId('bleu.de');
|
await testCloudflareAccount.convenience.getZoneId('bleu.de');
|
||||||
}
|
}
|
||||||
@ -30,37 +30,38 @@ tap.test(
|
|||||||
|
|
||||||
tap.test(
|
tap.test(
|
||||||
'.listRecords(domainName) -> should list all records for a specific Domain Name',
|
'.listRecords(domainName) -> should list all records for a specific Domain Name',
|
||||||
async tools => {
|
async (tools) => {
|
||||||
tools.timeout(600000);
|
tools.timeout(600000);
|
||||||
await testCloudflareAccount.convenience.listRecords('bleu.de').then(async responseArg => {
|
await testCloudflareAccount.convenience.listRecords('bleu.de').then(async (responseArg) => {
|
||||||
console.log(responseArg);
|
console.log(responseArg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
tap.test('should create a valid record for a subdomain', async tools => {
|
tap.test('should create a valid record for a subdomain', async (tools) => {
|
||||||
tools.timeout(600000);
|
tools.timeout(600000);
|
||||||
await testCloudflareAccount.convenience.createRecord(
|
await testCloudflareAccount.convenience.createRecord(
|
||||||
`${randomPrefix}subdomain.bleu.de`,
|
`${randomPrefix}subdomain.bleu.de`,
|
||||||
'A',
|
'A',
|
||||||
'127.0.0.1'
|
'127.0.0.1',
|
||||||
|
120
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should get a record from Cloudflare', async tools => {
|
tap.test('should get a record from Cloudflare', async (tools) => {
|
||||||
tools.timeout(600000);
|
tools.timeout(600000);
|
||||||
await testCloudflareAccount.convenience
|
await testCloudflareAccount.convenience
|
||||||
.getRecord(`${randomPrefix}subdomain.bleu.de`, 'A')
|
.getRecord(`${randomPrefix}subdomain.bleu.de`, 'A')
|
||||||
.then(responseArg => {
|
.then((responseArg) => {
|
||||||
console.log(responseArg);
|
console.log(responseArg);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should remove a subdomain record from Cloudflare', async tools => {
|
tap.test('should remove a subdomain record from Cloudflare', async (tools) => {
|
||||||
tools.timeout(600000);
|
tools.timeout(600000);
|
||||||
await testCloudflareAccount.convenience
|
await testCloudflareAccount.convenience
|
||||||
.removeRecord(`${randomPrefix}subdomain.bleu.de`, 'A')
|
.removeRecord(`${randomPrefix}subdomain.bleu.de`, 'A')
|
||||||
.then(async responseArg => {
|
.then(async (responseArg) => {
|
||||||
console.log(responseArg);
|
console.log(responseArg);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -78,8 +79,8 @@ tap.test('should create a worker', async () => {
|
|||||||
await worker.setRoutes([
|
await worker.setRoutes([
|
||||||
{
|
{
|
||||||
zoneName: 'bleu.de',
|
zoneName: 'bleu.de',
|
||||||
pattern: 'https://*bleu.de/hello'
|
pattern: 'https://*bleu.de/hello',
|
||||||
}
|
},
|
||||||
]);
|
]);
|
||||||
console.log(worker);
|
console.log(worker);
|
||||||
});
|
});
|
||||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
|
*/
|
||||||
|
export const commitinfo = {
|
||||||
|
name: '@mojoio/cloudflare',
|
||||||
|
version: '6.0.0',
|
||||||
|
description: 'easy cloudflare management'
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
import plugins = require('./cloudflare.plugins');
|
import * as plugins from './cloudflare.plugins.js';
|
||||||
import { logger } from './cloudflare.logger';
|
import { logger } from './cloudflare.logger.js';
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces/index.js';
|
||||||
|
|
||||||
// interfaces
|
// interfaces
|
||||||
import { WorkerManager } from './cloudflare.classes.workermanager';
|
import { WorkerManager } from './cloudflare.classes.workermanager.js';
|
||||||
import { ZoneManager } from './cloudflare.classes.zonemanager';
|
import { ZoneManager } from './cloudflare.classes.zonemanager.js';
|
||||||
|
|
||||||
export class CloudflareAccount {
|
export class CloudflareAccount {
|
||||||
private authToken: string;
|
private authToken: string;
|
||||||
@ -41,7 +41,7 @@ export class CloudflareAccount {
|
|||||||
getZoneId: async (domainName: string) => {
|
getZoneId: async (domainName: string) => {
|
||||||
const domain = new plugins.smartstring.Domain(domainName);
|
const domain = new plugins.smartstring.Domain(domainName);
|
||||||
const zoneArray = await this.convenience.listZones(domain.zoneName);
|
const zoneArray = await this.convenience.listZones(domain.zoneName);
|
||||||
const filteredResponse = zoneArray.filter(zoneArg => {
|
const filteredResponse = zoneArray.filter((zoneArg) => {
|
||||||
return zoneArg.name === domainName;
|
return zoneArg.name === domainName;
|
||||||
});
|
});
|
||||||
if (filteredResponse.length >= 1) {
|
if (filteredResponse.length >= 1) {
|
||||||
@ -62,7 +62,7 @@ export class CloudflareAccount {
|
|||||||
): Promise<interfaces.ICflareRecord> => {
|
): Promise<interfaces.ICflareRecord> => {
|
||||||
const domain = new plugins.smartstring.Domain(domainNameArg);
|
const domain = new plugins.smartstring.Domain(domainNameArg);
|
||||||
const recordArrayArg = await this.convenience.listRecords(domain.zoneName);
|
const recordArrayArg = await this.convenience.listRecords(domain.zoneName);
|
||||||
const filteredResponse = recordArrayArg.filter(recordArg => {
|
const filteredResponse = recordArrayArg.filter((recordArg) => {
|
||||||
return recordArg.type === typeArg && recordArg.name === domainNameArg;
|
return recordArg.type === typeArg && recordArg.name === domainNameArg;
|
||||||
});
|
});
|
||||||
return filteredResponse[0];
|
return filteredResponse[0];
|
||||||
@ -82,7 +82,7 @@ export class CloudflareAccount {
|
|||||||
name: domain.fullName,
|
name: domain.fullName,
|
||||||
type: typeArg,
|
type: typeArg,
|
||||||
content: contentArg,
|
content: contentArg,
|
||||||
ttl: ttlArg
|
ttl: ttlArg,
|
||||||
};
|
};
|
||||||
const response = await this.request(
|
const response = await this.request(
|
||||||
'POST',
|
'POST',
|
||||||
@ -168,18 +168,18 @@ export class CloudflareAccount {
|
|||||||
const domainId = await this.convenience.getZoneId(domain.zoneName);
|
const domainId = await this.convenience.getZoneId(domain.zoneName);
|
||||||
const requestUrl = `/zones/${domainId}/purge_cache`;
|
const requestUrl = `/zones/${domainId}/purge_cache`;
|
||||||
const payload = {
|
const payload = {
|
||||||
purge_everything: true
|
purge_everything: true,
|
||||||
};
|
};
|
||||||
const respone = await this.request('DELETE', requestUrl, payload);
|
const respone = await this.request('DELETE', requestUrl, payload);
|
||||||
},
|
},
|
||||||
// acme convenience functions
|
// acme convenience functions
|
||||||
acmeSetDnsChallenge: async (dnsChallenge: plugins.tsclass.network.IDnsChallenge) => {
|
acmeSetDnsChallenge: async (dnsChallenge: plugins.tsclass.network.IDnsChallenge) => {
|
||||||
await this.convenience.cleanRecord(dnsChallenge.hostName, 'TXT');
|
await this.convenience.cleanRecord(dnsChallenge.hostName, 'TXT');
|
||||||
await this.convenience.createRecord(dnsChallenge.hostName, 'TXT', dnsChallenge.challenge, 2);
|
await this.convenience.createRecord(dnsChallenge.hostName, 'TXT', dnsChallenge.challenge, 120);
|
||||||
},
|
},
|
||||||
acmeRemoveDnsChallenge: async (dnsChallenge: plugins.tsclass.network.IDnsChallenge) => {
|
acmeRemoveDnsChallenge: async (dnsChallenge: plugins.tsclass.network.IDnsChallenge) => {
|
||||||
await this.convenience.removeRecord(dnsChallenge.hostName, 'TXT');
|
await this.convenience.removeRecord(dnsChallenge.hostName, 'TXT');
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
public async request(
|
public async request(
|
||||||
@ -194,9 +194,9 @@ export class CloudflareAccount {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Authorization: `Bearer ${this.authToken}`,
|
Authorization: `Bearer ${this.authToken}`,
|
||||||
'Content-Length': Buffer.byteLength(JSON.stringify(dataArg)),
|
'Content-Length': Buffer.byteLength(JSON.stringify(dataArg)),
|
||||||
...requestHeadersArg
|
...requestHeadersArg,
|
||||||
},
|
},
|
||||||
requestBody: dataArg
|
requestBody: dataArg,
|
||||||
};
|
};
|
||||||
|
|
||||||
// route analysis
|
// route analysis
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
import * as plugins from './cloudflare.plugins';
|
import * as plugins from './cloudflare.plugins.js';
|
||||||
|
|
||||||
export class CloudflareRecord {}
|
export class CloudflareRecord {}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as plugins from './cloudflare.plugins';
|
import * as plugins from './cloudflare.plugins.js';
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces/index.js';
|
||||||
import { WorkerManager } from './cloudflare.classes.workermanager';
|
import { WorkerManager } from './cloudflare.classes.workermanager.js';
|
||||||
import { logger } from './cloudflare.logger';
|
import { logger } from './cloudflare.logger.js';
|
||||||
|
|
||||||
export interface IWorkerRoute extends interfaces.ICflareWorkerRoute {
|
export interface IWorkerRoute extends interfaces.ICflareWorkerRoute {
|
||||||
zoneName: string;
|
zoneName: string;
|
||||||
@ -78,14 +78,14 @@ export class CloudflareWorker {
|
|||||||
const requestRoute = `/zones/${zoneId}/workers/routes`;
|
const requestRoute = `/zones/${zoneId}/workers/routes`;
|
||||||
await this.workerManager.cfAccount.request('POST', requestRoute, {
|
await this.workerManager.cfAccount.request('POST', requestRoute, {
|
||||||
pattern: newRoute.pattern,
|
pattern: newRoute.pattern,
|
||||||
script: this.id
|
script: this.id,
|
||||||
});
|
});
|
||||||
} else if (routeStatus === 'needsUpdate') {
|
} else if (routeStatus === 'needsUpdate') {
|
||||||
const zoneId = await this.workerManager.cfAccount.convenience.getZoneId(newRoute.zoneName);
|
const zoneId = await this.workerManager.cfAccount.convenience.getZoneId(newRoute.zoneName);
|
||||||
const requestRoute = `/zones/${zoneId}/workers/routes/${routeIdForUpdate}`;
|
const requestRoute = `/zones/${zoneId}/workers/routes/${routeIdForUpdate}`;
|
||||||
await this.workerManager.cfAccount.request('PUT', requestRoute, {
|
await this.workerManager.cfAccount.request('PUT', requestRoute, {
|
||||||
pattern: newRoute.pattern,
|
pattern: newRoute.pattern,
|
||||||
script: this.id
|
script: this.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as plugins from './cloudflare.plugins';
|
import * as plugins from './cloudflare.plugins.js';
|
||||||
import { CloudflareAccount } from './cloudflare.classes.account';
|
import { CloudflareAccount } from './cloudflare.classes.account.js';
|
||||||
import { CloudflareWorker } from './cloudflare.classes.worker';
|
import { CloudflareWorker } from './cloudflare.classes.worker.js';
|
||||||
|
|
||||||
export class WorkerManager {
|
export class WorkerManager {
|
||||||
public cfAccount: CloudflareAccount;
|
public cfAccount: CloudflareAccount;
|
||||||
@ -14,7 +14,7 @@ export class WorkerManager {
|
|||||||
const route = `/accounts/${accountIdentifier}/workers/scripts/${workerName}`;
|
const route = `/accounts/${accountIdentifier}/workers/scripts/${workerName}`;
|
||||||
const responseBody = await this.cfAccount.request('PUT', route, workerScript, {
|
const responseBody = await this.cfAccount.request('PUT', route, workerScript, {
|
||||||
'Content-Type': 'application/javascript',
|
'Content-Type': 'application/javascript',
|
||||||
'Content-Length': Buffer.byteLength(workerScript)
|
'Content-Length': Buffer.byteLength(workerScript),
|
||||||
});
|
});
|
||||||
return CloudflareWorker.fromApiObject(this, responseBody.result);
|
return CloudflareWorker.fromApiObject(this, responseBody.result);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as plugins from './cloudflare.plugins';
|
import * as plugins from './cloudflare.plugins.js';
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces/index.js';
|
||||||
|
|
||||||
export class CloudflareZone implements interfaces.ICflareZone {
|
export class CloudflareZone implements interfaces.ICflareZone {
|
||||||
public static createFromApiObject(apiObject: interfaces.ICflareZone) {
|
public static createFromApiObject(apiObject: interfaces.ICflareZone) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as plugins from './cloudflare.plugins';
|
import * as plugins from './cloudflare.plugins.js';
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces/index.js';
|
||||||
import { CloudflareAccount } from './cloudflare.classes.account';
|
import { CloudflareAccount } from './cloudflare.classes.account.js';
|
||||||
import { CloudflareZone } from './cloudflare.classes.zone';
|
import { CloudflareZone } from './cloudflare.classes.zone.js';
|
||||||
|
|
||||||
export class ZoneManager {
|
export class ZoneManager {
|
||||||
public cfAccount: CloudflareAccount;
|
public cfAccount: CloudflareAccount;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
import * as plugins from './cloudflare.plugins';
|
import * as plugins from './cloudflare.plugins.js';
|
||||||
|
|
||||||
export const logger = new plugins.smartlog.ConsoleLog();
|
export const logger = new plugins.smartlog.ConsoleLog();
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
export { CloudflareAccount } from './cloudflare.classes.account';
|
export { CloudflareAccount } from './cloudflare.classes.account.js';
|
||||||
export { CloudflareWorker } from './cloudflare.classes.worker';
|
export { CloudflareWorker } from './cloudflare.classes.worker.js';
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
export * from './cloudflare.api.record';
|
export * from './cloudflare.api.record.js';
|
||||||
export * from './cloudflare.api.zone';
|
export * from './cloudflare.api.zone.js';
|
||||||
export * from './cloudflare.api.workerroute';
|
export * from './cloudflare.api.workerroute.js';
|
||||||
|
10
tsconfig.json
Normal file
10
tsconfig.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"useDefineForClassFields": false,
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "ES2022",
|
||||||
|
"moduleResolution": "nodenext",
|
||||||
|
"esModuleInterop": true
|
||||||
|
}
|
||||||
|
}
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
|
||||||
"rules": {
|
|
||||||
"semicolon": [true, "always"],
|
|
||||||
"no-console": false,
|
|
||||||
"ordered-imports": false,
|
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"member-ordering": {
|
|
||||||
"options":{
|
|
||||||
"order": [
|
|
||||||
"static-method"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaultSeverity": "warning"
|
|
||||||
}
|
|
Reference in New Issue
Block a user