cloudflare-ddns-sync 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +27 -20
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/lib/cloudflare-client.d.ts +3 -2
- package/dist/lib/cloudflare-client.js +9 -17
- package/dist/lib/cron.js +0 -1
- package/dist/lib/ip-utils.js +1 -3
- package/dist/types/Auth.d.ts +2 -0
- package/package.json +16 -18
- package/.eslintrc.json +0 -229
- package/dist/contracts/Auth.d.ts +0 -5
- /package/dist/{contracts → types}/Auth.js +0 -0
- /package/dist/{contracts → types}/Callbacks.d.ts +0 -0
- /package/dist/{contracts → types}/Callbacks.js +0 -0
- /package/dist/{contracts → types}/DomainRecordList.d.ts +0 -0
- /package/dist/{contracts → types}/DomainRecordList.js +0 -0
- /package/dist/{contracts → types}/Record.d.ts +0 -0
- /package/dist/{contracts → types}/Record.js +0 -0
- /package/dist/{contracts → types}/ZoneMap.d.ts +0 -0
- /package/dist/{contracts → types}/ZoneMap.js +0 -0
- /package/dist/{contracts → types}/cloudflare/RecordData.d.ts +0 -0
- /package/dist/{contracts → types}/cloudflare/RecordData.js +0 -0
- /package/dist/{contracts → types}/cloudflare/ZoneData.d.ts +0 -0
- /package/dist/{contracts → types}/cloudflare/ZoneData.js +0 -0
- /package/dist/{contracts → types}/cloudflare/index.d.ts +0 -0
- /package/dist/{contracts → types}/cloudflare/index.js +0 -0
- /package/dist/{contracts → types}/index.d.ts +0 -0
- /package/dist/{contracts → types}/index.js +0 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Cloudflare-DDNS-Sync
|
|
2
2
|
|
|
3
|
-

|
|
4
|
+
[](https://www.npmjs.com/package/cloudflare-ddns-sync)
|
|
5
|
+
[](https://www.npmjs.com/package/cloudflare-ddns-sync)
|
|
6
|
+
[](https://www.npmjs.com/package/cloudflare-ddns-sync-cli)
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
@@ -17,7 +17,7 @@ You may also have a look at the **official** [CLI version](https://www.npmjs.com
|
|
|
17
17
|
|
|
18
18
|
### Prerequisites
|
|
19
19
|
|
|
20
|
-
- Node
|
|
20
|
+
- Node
|
|
21
21
|
- Cloudflare Account
|
|
22
22
|
|
|
23
23
|
### Installation
|
|
@@ -38,21 +38,26 @@ in your project folder.
|
|
|
38
38
|
### Javascript Example
|
|
39
39
|
|
|
40
40
|
```javascript
|
|
41
|
-
const Cddnss = require(
|
|
41
|
+
const Cddnss = require('cloudflare-ddns-sync').default;
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
// either email and key or token
|
|
44
|
+
const cddnss = new Cddnss({
|
|
45
|
+
email: 'your@email.com',
|
|
46
|
+
key: '<your-cloudflare-api-key>',
|
|
47
|
+
token: '<your-cloudflare-api-token>',
|
|
48
|
+
});
|
|
44
49
|
|
|
45
50
|
const records = [
|
|
46
51
|
{
|
|
47
|
-
name:
|
|
48
|
-
type:
|
|
52
|
+
name: 'test-1.domain.com',
|
|
53
|
+
type: 'A', // optional
|
|
49
54
|
proxied: true, // optional
|
|
50
55
|
ttl: 1, // optional
|
|
51
56
|
priority: 0, // optional
|
|
52
|
-
content:
|
|
57
|
+
content: '1.2.3.4', // optional
|
|
53
58
|
},
|
|
54
59
|
{
|
|
55
|
-
name:
|
|
60
|
+
name: 'test-2.domain.com',
|
|
56
61
|
},
|
|
57
62
|
];
|
|
58
63
|
|
|
@@ -64,24 +69,26 @@ cddnss.syncRecords(records).then((result) => {
|
|
|
64
69
|
### Typescript Example
|
|
65
70
|
|
|
66
71
|
```typescript
|
|
67
|
-
import Cddnss, {
|
|
72
|
+
import Cddnss, {Record, RecordData} from 'cloudflare-ddns-sync';
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
// either email and key or token
|
|
75
|
+
const cddnss = new Cddnss({
|
|
76
|
+
email: 'your@email.com',
|
|
77
|
+
key: '<your-cloudflare-api-key>',
|
|
78
|
+
token: '<your-cloudflare-api-token>',
|
|
79
|
+
});
|
|
73
80
|
|
|
74
81
|
const records: Array<Record> = [
|
|
75
82
|
{
|
|
76
|
-
name:
|
|
77
|
-
type:
|
|
83
|
+
name: 'test-1.yourdomain.com',
|
|
84
|
+
type: 'A', // optional
|
|
78
85
|
proxied: true, // optional
|
|
79
86
|
ttl: 1, // optional
|
|
80
87
|
priority: 0, // optional
|
|
81
|
-
content:
|
|
88
|
+
content: '1.2.3.4', // optional
|
|
82
89
|
},
|
|
83
90
|
{
|
|
84
|
-
name:
|
|
91
|
+
name: 'test-2.yourdomain.com',
|
|
85
92
|
},
|
|
86
93
|
];
|
|
87
94
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScheduledTask } from 'node-cron';
|
|
2
|
-
import { Auth, DomainRecordList, MultiSyncCallback, Record, RecordData } from './
|
|
2
|
+
import { Auth, DomainRecordList, MultiSyncCallback, Record, RecordData } from './types/index.js';
|
|
3
3
|
export default class CloudflareDDNSSync {
|
|
4
4
|
private cloudflareClient;
|
|
5
5
|
constructor(auth: Auth);
|
|
@@ -16,4 +16,4 @@ export default class CloudflareDDNSSync {
|
|
|
16
16
|
syncRecord(record: Record, ip?: string): Promise<RecordData>;
|
|
17
17
|
syncRecords(records: Array<Record>, ip?: string): Promise<Array<RecordData>>;
|
|
18
18
|
}
|
|
19
|
-
export * from './
|
|
19
|
+
export * from './types/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Cloudflare from 'cloudflare';
|
|
2
|
+
import { DomainRecordList, Record, RecordData } from '../types/index.js';
|
|
2
3
|
export default class CloudflareClient {
|
|
3
4
|
private cloudflare;
|
|
4
5
|
private zoneMap;
|
|
5
|
-
constructor(auth:
|
|
6
|
+
constructor(auth: Cloudflare.AuthObject);
|
|
6
7
|
syncRecord(record: Record, ip?: string): Promise<RecordData>;
|
|
7
8
|
syncRecords(records: Array<Record>, ip?: string): Promise<Array<RecordData>>;
|
|
8
9
|
removeRecordByNameAndType(recordName: string, recordType?: string): Promise<void>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ParseResultType, fromUrl, parseDomain
|
|
1
|
+
import { ParseResultType, fromUrl, parseDomain } from 'parse-domain';
|
|
2
2
|
import Cloudflare from 'cloudflare';
|
|
3
3
|
import IPUtils from './ip-utils.js';
|
|
4
4
|
const ipv4Regex = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/u;
|
|
5
|
-
// eslint-disable-next-line max-len
|
|
6
5
|
const ipv6Regex = /^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::))))$/u;
|
|
7
6
|
export default class CloudflareClient {
|
|
8
7
|
cloudflare;
|
|
@@ -57,9 +56,7 @@ export default class CloudflareClient {
|
|
|
57
56
|
const domains = this.getDomainsFromRecords(records);
|
|
58
57
|
const recordDataPromises = domains.map(async (domain) => {
|
|
59
58
|
const recordDataForDomain = await this.getRecordsByDomain(domain);
|
|
60
|
-
const recordDataForDomainFilteredByRecords = recordDataForDomain
|
|
61
|
-
.filter((singleRecordData) => records
|
|
62
|
-
.some((record) => record.name.toLowerCase() === singleRecordData.name.toLowerCase()));
|
|
59
|
+
const recordDataForDomainFilteredByRecords = recordDataForDomain.filter((singleRecordData) => records.some((record) => record.name.toLowerCase() === singleRecordData.name.toLowerCase()));
|
|
63
60
|
return recordDataForDomainFilteredByRecords;
|
|
64
61
|
});
|
|
65
62
|
const recordDataForDomains = await Promise.all(recordDataPromises);
|
|
@@ -106,7 +103,7 @@ export default class CloudflareClient {
|
|
|
106
103
|
throw Error(`Could not create Record "${dnsRecord.name}": '${dnsRecord.content}' is not a valid domain name!`);
|
|
107
104
|
}
|
|
108
105
|
}
|
|
109
|
-
const response = await this.cloudflare.dnsRecords.add(zoneId, dnsRecord);
|
|
106
|
+
const response = (await this.cloudflare.dnsRecords.add(zoneId, dnsRecord));
|
|
110
107
|
return response.result;
|
|
111
108
|
}
|
|
112
109
|
async updateRecord(zoneId, recordId, record, ip) {
|
|
@@ -136,11 +133,11 @@ export default class CloudflareClient {
|
|
|
136
133
|
throw Error(`Could not update Record "${dnsRecord.name}": '${dnsRecord.content}' is not a valid domain name!`);
|
|
137
134
|
}
|
|
138
135
|
}
|
|
139
|
-
const response = await this.cloudflare.dnsRecords.edit(zoneId, recordId, dnsRecord);
|
|
136
|
+
const response = (await this.cloudflare.dnsRecords.edit(zoneId, recordId, dnsRecord));
|
|
140
137
|
return response.result;
|
|
141
138
|
}
|
|
142
139
|
async updateZoneMap() {
|
|
143
|
-
const response = await this.cloudflare.zones.browse();
|
|
140
|
+
const response = (await this.cloudflare.zones.browse());
|
|
144
141
|
const zones = response.result;
|
|
145
142
|
this.zoneMap = new Map();
|
|
146
143
|
for (const zone of zones) {
|
|
@@ -158,8 +155,7 @@ export default class CloudflareClient {
|
|
|
158
155
|
async getRecordByNameAndType(recordName, recordType) {
|
|
159
156
|
const domain = this.getDomainByRecordName(recordName);
|
|
160
157
|
const records = await this.getRecordsByDomain(domain);
|
|
161
|
-
const record = records.find((currentRecord) => currentRecord.name.toLowerCase() === recordName.toLowerCase()
|
|
162
|
-
&& currentRecord.type.toLowerCase() === recordType.toLowerCase());
|
|
158
|
+
const record = records.find((currentRecord) => currentRecord.name.toLowerCase() === recordName.toLowerCase() && currentRecord.type.toLowerCase() === recordType.toLowerCase());
|
|
163
159
|
const recordNotFound = record === undefined;
|
|
164
160
|
if (recordNotFound) {
|
|
165
161
|
throw new Error(`Record '${recordName}' not found.`);
|
|
@@ -186,12 +182,10 @@ export default class CloudflareClient {
|
|
|
186
182
|
let allRecordsFound = false;
|
|
187
183
|
const recordsPerPage = 5000;
|
|
188
184
|
while (!allRecordsFound) {
|
|
189
|
-
|
|
190
|
-
const response = await this.cloudflare.dnsRecords.browse(zoneId, {
|
|
185
|
+
const response = (await this.cloudflare.dnsRecords.browse(zoneId, {
|
|
191
186
|
page: pageIndex,
|
|
192
|
-
// eslint-disable-next-line camelcase
|
|
193
187
|
per_page: recordsPerPage,
|
|
194
|
-
});
|
|
188
|
+
}));
|
|
195
189
|
records.push(...response.result);
|
|
196
190
|
allRecordsFound = response.result.length < recordsPerPage;
|
|
197
191
|
pageIndex++;
|
|
@@ -211,9 +205,7 @@ export default class CloudflareClient {
|
|
|
211
205
|
return zoneId;
|
|
212
206
|
}
|
|
213
207
|
getDomainsFromRecords(records) {
|
|
214
|
-
const domains = records
|
|
215
|
-
.map((record) => this.getDomainByRecordName(record.name))
|
|
216
|
-
.filter((domain, index, domainList) => domainList.indexOf(domain.toLowerCase()) === index);
|
|
208
|
+
const domains = records.map((record) => this.getDomainByRecordName(record.name)).filter((domain, index, domainList) => domainList.indexOf(domain.toLowerCase()) === index);
|
|
217
209
|
return domains;
|
|
218
210
|
}
|
|
219
211
|
getDomainByRecordName(recordName) {
|
package/dist/lib/cron.js
CHANGED
|
@@ -3,7 +3,6 @@ export default class Cron {
|
|
|
3
3
|
static createCronJob(cronExpression, callback) {
|
|
4
4
|
const cronExpressionIsInvalid = !this.isValid(cronExpression);
|
|
5
5
|
if (cronExpressionIsInvalid) {
|
|
6
|
-
// eslint-disable-next-line max-len
|
|
7
6
|
throw new Error(`'${cronExpression}' is not a valid cron expression.\nHere you can see how cron expressions work: https://cddnss.knaup.pw/cron-expression-syntax`);
|
|
8
7
|
}
|
|
9
8
|
return cron.schedule(cronExpression, () => {
|
package/dist/lib/ip-utils.js
CHANGED
|
@@ -45,8 +45,6 @@ export default class IPUtils {
|
|
|
45
45
|
IPUtils.ipChangeEventListeners.delete(eventListenerId);
|
|
46
46
|
}
|
|
47
47
|
static getId() {
|
|
48
|
-
return Math.random().toString(36)
|
|
49
|
-
.substring(2, 15) + Math.random().toString(36)
|
|
50
|
-
.substring(2, 15);
|
|
48
|
+
return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
51
49
|
}
|
|
52
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudflare-ddns-sync",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "A simple module to update DNS records on Cloudflare whenever you want",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Steffen Knaup <SteffenKnaup@hotmail.de>",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsc",
|
|
24
|
-
"lint": "
|
|
25
|
-
"lint:fix": "
|
|
24
|
+
"lint": "prettier -c ./src",
|
|
25
|
+
"lint:fix": "prettier -w ./src",
|
|
26
26
|
"test": "c8 mocha dist/tests/*.js --timeout 15000 --exit",
|
|
27
27
|
"test:coverage": "npm run test:coverage-check && npm run test:coverage-report",
|
|
28
28
|
"test:coverage-check": "c8 check-coverage --lines 70 --functions 70 --branches 70",
|
|
@@ -30,25 +30,23 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"cloudflare": "2.9.1",
|
|
33
|
-
"node-cron": "3.0.
|
|
34
|
-
"parse-domain": "
|
|
33
|
+
"node-cron": "3.0.3",
|
|
34
|
+
"parse-domain": "8.0.1",
|
|
35
35
|
"public-ip": "6.0.1",
|
|
36
36
|
"what-is-my-ip-address": "1.0.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/chai": "4.3.
|
|
40
|
-
"@types/cloudflare": "^2.7.
|
|
41
|
-
"@types/minimist": "1.2.
|
|
42
|
-
"@types/mocha": "10.0.
|
|
43
|
-
"@types/node": "
|
|
44
|
-
"@types/node-cron": "3.0.
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"chai": "4.3.7",
|
|
49
|
-
"eslint": "8.30.0",
|
|
50
|
-
"minimist": "1.2.7",
|
|
39
|
+
"@types/chai": "4.3.11",
|
|
40
|
+
"@types/cloudflare": "^2.7.13",
|
|
41
|
+
"@types/minimist": "1.2.5",
|
|
42
|
+
"@types/mocha": "10.0.6",
|
|
43
|
+
"@types/node": "20.10.7",
|
|
44
|
+
"@types/node-cron": "3.0.11",
|
|
45
|
+
"c8": "9.0.0",
|
|
46
|
+
"chai": "5.0.0",
|
|
47
|
+
"minimist": "1.2.8",
|
|
51
48
|
"mocha": "10.2.0",
|
|
52
|
-
"
|
|
49
|
+
"prettier": "^3.1.1",
|
|
50
|
+
"typescript": "5.3.3"
|
|
53
51
|
}
|
|
54
52
|
}
|
package/.eslintrc.json
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"es2021": true,
|
|
4
|
-
"node": true
|
|
5
|
-
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"eslint:recommended",
|
|
8
|
-
"plugin:@typescript-eslint/recommended"
|
|
9
|
-
],
|
|
10
|
-
"parser": "@typescript-eslint/parser",
|
|
11
|
-
"parserOptions": {
|
|
12
|
-
"ecmaVersion": "latest",
|
|
13
|
-
"sourceType": "module"
|
|
14
|
-
},
|
|
15
|
-
"plugins": [
|
|
16
|
-
"@typescript-eslint"
|
|
17
|
-
],
|
|
18
|
-
"rules": {
|
|
19
|
-
"@typescript-eslint/ban-types": "off",
|
|
20
|
-
"@typescript-eslint/indent": ["error", 2],
|
|
21
|
-
"@typescript-eslint/no-shadow": "error",
|
|
22
|
-
"accessor-pairs": "error",
|
|
23
|
-
"array-bracket-newline": "error",
|
|
24
|
-
"array-bracket-spacing": "error",
|
|
25
|
-
"array-callback-return": "error",
|
|
26
|
-
"array-element-newline": "error",
|
|
27
|
-
"arrow-body-style": "error",
|
|
28
|
-
"arrow-parens": "error",
|
|
29
|
-
"arrow-spacing": "error",
|
|
30
|
-
"block-scoped-var": "error",
|
|
31
|
-
"block-spacing": "error",
|
|
32
|
-
"brace-style": "error",
|
|
33
|
-
"camelcase": "warn",
|
|
34
|
-
"capitalized-comments": "off",
|
|
35
|
-
"class-methods-use-this": "off",
|
|
36
|
-
"comma-dangle": ["error", "always-multiline"],
|
|
37
|
-
"comma-spacing": "error",
|
|
38
|
-
"comma-style": "error",
|
|
39
|
-
"complexity": "error",
|
|
40
|
-
"computed-property-spacing": "error",
|
|
41
|
-
"consistent-return": "error",
|
|
42
|
-
"consistent-this": "error",
|
|
43
|
-
"curly": "error",
|
|
44
|
-
"default-case": "error",
|
|
45
|
-
"default-case-last": "error",
|
|
46
|
-
"default-param-last": "error",
|
|
47
|
-
"dot-location": ["error", "property"],
|
|
48
|
-
"dot-notation": "error",
|
|
49
|
-
"eol-last": "error",
|
|
50
|
-
"eqeqeq": "error",
|
|
51
|
-
"func-call-spacing": "error",
|
|
52
|
-
"func-name-matching": "error",
|
|
53
|
-
"func-names": "error",
|
|
54
|
-
"func-style": ["error", "declaration", {
|
|
55
|
-
"allowArrowFunctions": true
|
|
56
|
-
}],
|
|
57
|
-
"function-call-argument-newline": ["error", "consistent"],
|
|
58
|
-
"function-paren-newline": "error",
|
|
59
|
-
"generator-star-spacing": "error",
|
|
60
|
-
"grouped-accessor-pairs": "error",
|
|
61
|
-
"guard-for-in": "error",
|
|
62
|
-
"id-denylist": "error",
|
|
63
|
-
"id-length": "off",
|
|
64
|
-
"id-match": "error",
|
|
65
|
-
"implicit-arrow-linebreak": "error",
|
|
66
|
-
"indent": "off",
|
|
67
|
-
"init-declarations": "off",
|
|
68
|
-
"key-spacing": "error",
|
|
69
|
-
"keyword-spacing": "error",
|
|
70
|
-
"line-comment-position": "error",
|
|
71
|
-
"linebreak-style": "error",
|
|
72
|
-
"lines-around-comment": "off",
|
|
73
|
-
"lines-between-class-members": "off",
|
|
74
|
-
"max-classes-per-file": "error",
|
|
75
|
-
"max-depth": "error",
|
|
76
|
-
"max-len": ["error", 150],
|
|
77
|
-
"max-lines": ["error", 1000],
|
|
78
|
-
"max-lines-per-function": "off",
|
|
79
|
-
"max-nested-callbacks": "error",
|
|
80
|
-
"max-params": ["warn", {"max": 4}],
|
|
81
|
-
"max-statements": "off",
|
|
82
|
-
"max-statements-per-line": "off",
|
|
83
|
-
"multiline-comment-style": "off",
|
|
84
|
-
"multiline-ternary": "off",
|
|
85
|
-
"new-cap": "error",
|
|
86
|
-
"new-parens": "error",
|
|
87
|
-
"newline-per-chained-call": "error",
|
|
88
|
-
"no-alert": "error",
|
|
89
|
-
"no-array-constructor": "error",
|
|
90
|
-
"no-await-in-loop": "off",
|
|
91
|
-
"no-bitwise": "error",
|
|
92
|
-
"no-caller": "error",
|
|
93
|
-
"no-confusing-arrow": "error",
|
|
94
|
-
"no-console": "error",
|
|
95
|
-
"no-constructor-return": "error",
|
|
96
|
-
"no-continue": "error",
|
|
97
|
-
"no-div-regex": "error",
|
|
98
|
-
"no-duplicate-imports": "error",
|
|
99
|
-
"no-else-return": "error",
|
|
100
|
-
"no-empty-function": "error",
|
|
101
|
-
"no-eq-null": "error",
|
|
102
|
-
"no-eval": "error",
|
|
103
|
-
"no-extend-native": "error",
|
|
104
|
-
"no-extra-bind": "error",
|
|
105
|
-
"no-extra-label": "error",
|
|
106
|
-
"no-extra-parens": "off",
|
|
107
|
-
"no-floating-decimal": "error",
|
|
108
|
-
"no-implicit-coercion": "error",
|
|
109
|
-
"no-implicit-globals": "error",
|
|
110
|
-
"no-implied-eval": "error",
|
|
111
|
-
"no-inline-comments": "error",
|
|
112
|
-
"no-invalid-this": "error",
|
|
113
|
-
"no-iterator": "error",
|
|
114
|
-
"no-label-var": "error",
|
|
115
|
-
"no-labels": "error",
|
|
116
|
-
"no-lone-blocks": "error",
|
|
117
|
-
"no-lonely-if": "error",
|
|
118
|
-
"no-loop-func": "error",
|
|
119
|
-
"no-magic-numbers": "off",
|
|
120
|
-
"no-mixed-operators": "error",
|
|
121
|
-
"no-multi-assign": "error",
|
|
122
|
-
"no-multi-spaces": "error",
|
|
123
|
-
"no-multi-str": "error",
|
|
124
|
-
"no-multiple-empty-lines": "error",
|
|
125
|
-
"no-negated-condition": "error",
|
|
126
|
-
"no-nested-ternary": "error",
|
|
127
|
-
"no-new": "error",
|
|
128
|
-
"no-new-func": "error",
|
|
129
|
-
"no-new-object": "error",
|
|
130
|
-
"no-new-wrappers": "error",
|
|
131
|
-
"no-octal-escape": "error",
|
|
132
|
-
"no-param-reassign": "error",
|
|
133
|
-
"no-plusplus": "off",
|
|
134
|
-
"no-promise-executor-return": "error",
|
|
135
|
-
"no-proto": "error",
|
|
136
|
-
"no-restricted-exports": "error",
|
|
137
|
-
"no-restricted-globals": "error",
|
|
138
|
-
"no-restricted-imports": "error",
|
|
139
|
-
"no-restricted-properties": "error",
|
|
140
|
-
"no-restricted-syntax": "error",
|
|
141
|
-
"no-return-assign": "error",
|
|
142
|
-
"no-return-await": "error",
|
|
143
|
-
"no-script-url": "error",
|
|
144
|
-
"no-self-compare": "error",
|
|
145
|
-
"no-sequences": "error",
|
|
146
|
-
"no-shadow": "off",
|
|
147
|
-
"no-tabs": "error",
|
|
148
|
-
"no-template-curly-in-string": "error",
|
|
149
|
-
"no-ternary": "off",
|
|
150
|
-
"no-throw-literal": "error",
|
|
151
|
-
"no-trailing-spaces": "error",
|
|
152
|
-
"no-undef-init": "error",
|
|
153
|
-
"no-undefined": "off",
|
|
154
|
-
"no-underscore-dangle": "error",
|
|
155
|
-
"no-unmodified-loop-condition": "error",
|
|
156
|
-
"no-unneeded-ternary": "error",
|
|
157
|
-
"no-unreachable-loop": "error",
|
|
158
|
-
"no-unused-expressions": "error",
|
|
159
|
-
"no-unused-private-class-members": "error",
|
|
160
|
-
"no-use-before-define": "off",
|
|
161
|
-
"no-useless-call": "error",
|
|
162
|
-
"no-useless-computed-key": "error",
|
|
163
|
-
"no-useless-concat": "error",
|
|
164
|
-
"no-useless-constructor": "error",
|
|
165
|
-
"no-useless-rename": "error",
|
|
166
|
-
"no-useless-return": "error",
|
|
167
|
-
"no-var": "error",
|
|
168
|
-
"no-void": "error",
|
|
169
|
-
"no-warning-comments": "error",
|
|
170
|
-
"no-whitespace-before-property": "error",
|
|
171
|
-
"nonblock-statement-body-position": "error",
|
|
172
|
-
"object-curly-newline": "error",
|
|
173
|
-
"object-curly-spacing": "error",
|
|
174
|
-
"object-property-newline": "error",
|
|
175
|
-
"object-shorthand": ["error", "never"],
|
|
176
|
-
"one-var": ["error", "never"],
|
|
177
|
-
"operator-assignment": "error",
|
|
178
|
-
"operator-linebreak": ["error", "before"],
|
|
179
|
-
"padded-blocks": ["error", "never"],
|
|
180
|
-
"padding-line-between-statements": "error",
|
|
181
|
-
"prefer-arrow-callback": "error",
|
|
182
|
-
"prefer-const": "error",
|
|
183
|
-
"prefer-destructuring": "error",
|
|
184
|
-
"prefer-exponentiation-operator": "error",
|
|
185
|
-
"prefer-named-capture-group": "off",
|
|
186
|
-
"prefer-numeric-literals": "error",
|
|
187
|
-
"prefer-object-spread": "error",
|
|
188
|
-
"prefer-promise-reject-errors": "error",
|
|
189
|
-
"prefer-regex-literals": "error",
|
|
190
|
-
"prefer-rest-params": "error",
|
|
191
|
-
"prefer-spread": "error",
|
|
192
|
-
"prefer-template": "error",
|
|
193
|
-
"quote-props": ["error", "as-needed"],
|
|
194
|
-
"quotes": ["error", "single"],
|
|
195
|
-
"radix": "error",
|
|
196
|
-
"require-atomic-updates": "error",
|
|
197
|
-
"require-await": "error",
|
|
198
|
-
"require-unicode-regexp": "error",
|
|
199
|
-
"rest-spread-spacing": "error",
|
|
200
|
-
"semi": "error",
|
|
201
|
-
"semi-spacing": "error",
|
|
202
|
-
"semi-style": "error",
|
|
203
|
-
"sort-imports": ["error", {
|
|
204
|
-
"ignoreCase": false,
|
|
205
|
-
"ignoreDeclarationSort": false,
|
|
206
|
-
"ignoreMemberSort": false,
|
|
207
|
-
"allowSeparatedGroups": true
|
|
208
|
-
}],
|
|
209
|
-
"sort-keys": "off",
|
|
210
|
-
"sort-vars": "error",
|
|
211
|
-
"space-before-blocks": "error",
|
|
212
|
-
"space-before-function-paren": ["error", "never"],
|
|
213
|
-
"space-in-parens": "error",
|
|
214
|
-
"space-infix-ops": "error",
|
|
215
|
-
"space-unary-ops": "error",
|
|
216
|
-
"spaced-comment": "error",
|
|
217
|
-
"strict": "error",
|
|
218
|
-
"switch-colon-spacing": "error",
|
|
219
|
-
"symbol-description": "error",
|
|
220
|
-
"template-curly-spacing": "error",
|
|
221
|
-
"template-tag-spacing": "error",
|
|
222
|
-
"unicode-bom": "error",
|
|
223
|
-
"vars-on-top": "error",
|
|
224
|
-
"wrap-iife": "error",
|
|
225
|
-
"wrap-regex": "error",
|
|
226
|
-
"yield-star-spacing": "error",
|
|
227
|
-
"yoda": "error"
|
|
228
|
-
}
|
|
229
|
-
}
|
package/dist/contracts/Auth.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|