Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .eslintrc

This file was deleted.

28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: weekly
cooldown:
default-days: 7
groups:
dev-dependencies:
dependency-type: development
update-types: [minor, patch]
dev-security-updates:
applies-to: security-updates
dependency-type: development
ignore:
# typescript-eslint supports TypeScript below 6.1 only; a major upgrade is a manual migration.
- dependency-name: typescript
update-types: ['version-update:semver-major']
# Newer Node.js types permit APIs that the supported Node.js versions do not have.
- dependency-name: '@types/node'
update-types: ['version-update:semver-major']
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: weekly
cooldown:
default-days: 7
12 changes: 8 additions & 4 deletions .github/workflows/format-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: format-lint.yaml
name: CI

on:
pull_request:
Expand All @@ -9,12 +9,16 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '20'
node-version: '24'
- run: npm ci
- name: Prettier check
run: npm run format:check
- name: Lint the code
run: npm run lint
- name: Build
run: npm run build
- name: Test
run: npm test
17 changes: 14 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '20.x'
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: Check the release tag
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
expected="v$(node -p "require('./package.json').version")"
if [ "$RELEASE_TAG" != "$expected" ]; then
echo "::error::Release tag $RELEASE_TAG is not $expected (version in package.json)."
exit 1
fi
- name: Test
run: npm test
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ You can find more information about the package on [npmjs.org](https://www.npmjs

## Example

The third argument of the `ApiClient` constructor turns on debug mode, which prints each request and response with `console.info`; this output can contain sensitive data.

```typescript
import { ApiClient, Language } from 'domrobot-client';

Expand All @@ -37,7 +39,7 @@ const sharedSecret = ''; // only needed for 2FA.
const domain = 'my-test-domain-' + Math.round(Math.random() * 1e8) + '.com'; // the domain which will be checked.

const asyncFunc = async () => {
// By default your ApiClient uses the test api (OT&E). If you want to use the production/live api
// By default, your ApiClient uses the test api (OT&E). If you want to use the production/live api
// we have a constant named API_URL_LIVE in the ApiClient class. Just set apiUrl=ApiClient.API_URL_LIVE and you're good.
const apiClient = new ApiClient(ApiClient.API_URL_OTE, Language.EN, true);

Expand Down Expand Up @@ -66,7 +68,7 @@ const asyncFunc = async () => {
};

// call the async function
asyncFunc();
asyncFunc().catch(console.error);
```

## License
Expand Down
10 changes: 10 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import js from '@eslint/js';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';

export default defineConfig(js.configs.recommended, tseslint.configs.recommended, {
rules: {
// The public API uses `any`.
'@typescript-eslint/no-explicit-any': 'off',
},
});
Loading
Loading