Skip to content

Commit

Permalink
chore: upgrade to node 18
Browse files Browse the repository at this point in the history
  • Loading branch information
yanlow committed Nov 29, 2023
1 parent b752de3 commit 05ab1a5
Show file tree
Hide file tree
Showing 9 changed files with 21,734 additions and 17,214 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x
- run: npm ci --ignore-scripts
- run: npm run lint

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x
- run: npm ci
- run: npm run build
- uses: codfish/semantic-release-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x
- run: npm ci
- run: npm run test -- --runInBand

Expand All @@ -25,6 +25,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x
- run: npm ci
- run: npm run build
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/hydrogen
74 changes: 37 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Validation is run on all retrieved records to ensure they conform to the expecte
npm i @govtechsg/dnsprove
```

---
***

## Debug

Expand All @@ -49,25 +49,25 @@ This library uses [runtypes](https://github.com/pelotom/runtypes) for compile ti

#### Table of Contents

- [OpenAttestationDNSTextRecord](#openattestationdnstextrecord)
- [OpenAttestationDnsDidRecord](#openattestationdnsdidrecord)
- [IDNSRecord](#idnsrecord)
- [IDNSQueryResponse](#idnsqueryresponse)
- [CustomDnsResolver](#customdnsresolver)
- [defaultDnsResolvers](#defaultdnsresolvers)
- [queryDns](#querydns)
- [Parameters](#parameters)
- [parseOpenAttestationRecord](#parseopenattestationrecord)
- [Parameters](#parameters-1)
- [parseDocumentStoreResults](#parsedocumentstoreresults)
- [Parameters](#parameters-2)
- [parseDnsDidResults](#parsednsdidresults)
- [Parameters](#parameters-3)
- [getDocumentStoreRecords](#getdocumentstorerecords)
- [Parameters](#parameters-4)
- [Examples](#examples)
- [getDnsDidRecords](#getdnsdidrecords)
- [Parameters](#parameters-5)
* [OpenAttestationDNSTextRecord](#openattestationdnstextrecord)
* [OpenAttestationDnsDidRecord](#openattestationdnsdidrecord)
* [IDNSRecord](#idnsrecord)
* [IDNSQueryResponse](#idnsqueryresponse)
* [CustomDnsResolver](#customdnsresolver)
* [defaultDnsResolvers](#defaultdnsresolvers)
* [queryDns](#querydns)
* [Parameters](#parameters)
* [parseOpenAttestationRecord](#parseopenattestationrecord)
* [Parameters](#parameters-1)
* [parseDocumentStoreResults](#parsedocumentstoreresults)
* [Parameters](#parameters-2)
* [parseDnsDidResults](#parsednsdidresults)
* [Parameters](#parameters-3)
* [getDocumentStoreRecords](#getdocumentstorerecords)
* [Parameters](#parameters-4)
* [Examples](#examples)
* [getDnsDidRecords](#getdnsdidrecords)
* [Parameters](#parameters-5)

### OpenAttestationDNSTextRecord

Expand All @@ -89,49 +89,49 @@ Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global

#### Parameters

- `domain` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
- `customDnsResolvers` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[CustomDnsResolver](#customdnsresolver)>**
* `domain` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
* `customDnsResolvers` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[CustomDnsResolver](#customdnsresolver)>**

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[IDNSQueryResponse](#idnsqueryresponse)>**
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[IDNSQueryResponse](#idnsqueryresponse)>**

### parseOpenAttestationRecord

Parses one openattestation DNS-TXT record and turns it into an OpenAttestationsDNSTextRecord object

#### Parameters

- `record` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** e.g: '"openatts net=ethereum netId=3 addr=0x0c9d5E6C766030cc6f0f49951D275Ad0701F81EC"'
* `record` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** e.g: '"openatts net=ethereum netId=3 addr=0x0c9d5E6C766030cc6f0f49951D275Ad0701F81EC"'

Returns **GenericObject**
Returns **GenericObject**

### parseDocumentStoreResults

Takes a DNS-TXT Record set and returns openattestation document store records if any

#### Parameters

- `recordSet` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[IDNSRecord](#idnsrecord)>** Refer to tests for examples (optional, default `[]`)
- `dnssec` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
* `recordSet` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[IDNSRecord](#idnsrecord)>** Refer to tests for examples (optional, default `[]`)
* `dnssec` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[OpenAttestationDNSTextRecord](#openattestationdnstextrecord)>**
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[OpenAttestationDNSTextRecord](#openattestationdnstextrecord)>**

### parseDnsDidResults

#### Parameters

- `recordSet` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[IDNSRecord](#idnsrecord)>** (optional, default `[]`)
- `dnssec` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
* `recordSet` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[IDNSRecord](#idnsrecord)>** (optional, default `[]`)
* `dnssec` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[OpenAttestationDnsDidRecord](#openattestationdnsdidrecord)>**
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[OpenAttestationDnsDidRecord](#openattestationdnsdidrecord)>**

### getDocumentStoreRecords

Queries a given domain and parses the results to retrieve openattestation document store records if any

#### Parameters

- `domain` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** e.g: "example.openattestation.com"
- `customDnsResolvers` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[CustomDnsResolver](#customdnsresolver)>?**
* `domain` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** e.g: "example.openattestation.com"
* `customDnsResolvers` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[CustomDnsResolver](#customdnsresolver)>?**

#### Examples

Expand All @@ -144,16 +144,16 @@ addr: '0x2f60375e8144e16Adf1979936301D8341D58C36C',
dnssec: true } ]
```

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[OpenAttestationDNSTextRecord](#openattestationdnstextrecord)>>**
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[OpenAttestationDNSTextRecord](#openattestationdnstextrecord)>>**

### getDnsDidRecords

#### Parameters

- `domain` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
- `customDnsResolvers` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[CustomDnsResolver](#customdnsresolver)>?**
* `domain` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
* `customDnsResolvers` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[CustomDnsResolver](#customdnsresolver)>?**

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[OpenAttestationDnsDidRecord](#openattestationdnsdidrecord)>>**
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[OpenAttestationDnsDidRecord](#openattestationdnsdidrecord)>>**

## License

Expand Down
Loading

0 comments on commit 05ab1a5

Please sign in to comment.