-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- user: permit @ character in username - import .release submodule - doc(CHANGELOG): added - feat(user): exports v2 & v3 schemas - run tests with shell script - reduce duplicate workflow runs
- Loading branch information
Showing
27 changed files
with
310 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
paths: | ||
- package.json | ||
release: | ||
types: [ published ] | ||
types: [published] | ||
|
||
env: | ||
CI: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule ".release"] | ||
path = .release | ||
url = git@github.com:msimerson/.release.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# CHANGES | ||
|
||
### Unreleased | ||
|
||
### [0.6.3] - 2024-02-23 | ||
|
||
- replace mocha with node's test runner | ||
- user: permit @ character in username | ||
- feat(user): export login, username, & password | ||
- feat(zone_record): add zone_record validation | ||
- feat(zone): added zone validation | ||
- refactor: lib/common -> lib/shared | ||
- feat(nameserver): added NS validation | ||
- feat: import user & group tests from v2 | ||
- add group & permission | ||
|
||
[0.6.3]: https://github.com/NicTool/validate/releases/tag/0.6.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
for (const l of ['user', 'group', 'nameserver', 'zone', 'zone_record']) { | ||
module.exports[l] = require(`./lib/${l}`)[l] | ||
for (const l of ['group', 'user', 'nameserver', 'zone', 'zone_record']) { | ||
module.exports[l] = require(`./lib/${l}`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "example.com", | ||
"id": 3, | ||
"parent_gid": 0, | ||
"deleted": false, | ||
"has_children": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"id": 3, | ||
"gid": 1, | ||
"name": "ns.tld.", | ||
"address": "1.2.3.4", | ||
"export_type": "djbdns", | ||
"ttl": 3600, | ||
"deleted": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"username": "matt", | ||
"password": "(t0ps3kREt)", | ||
"email": "matt@example.com", | ||
"first_name": "Matt", | ||
"last_name": "Simerson" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"gid": 1, | ||
"zone": "example.com", | ||
"ttl": 1, | ||
"serial": 20240404, | ||
"nameservers": ["a.ns.example.com", "b.ns.example.com"], | ||
"mailaddr": "hostmaster.example.com.", | ||
"description": "test", | ||
"refresh": 1, | ||
"retry": 2, | ||
"expire": 3, | ||
"minimum": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"zid": 1, | ||
"name": "a", | ||
"ttl": 86400, | ||
"type": "A", | ||
"address": "1.1.1.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const assert = require('node:assert/strict') | ||
const { describe, it } = require('node:test') | ||
|
||
const schema = require('../index') | ||
|
||
describe('index', function () { | ||
const testGroup = require('./fixtures/v2/group.json') | ||
const testUser = require('./fixtures/v2/user.json') | ||
const testNs = require('./fixtures/v2/nameserver.json') | ||
|
||
it('exports user', () => { | ||
const testCase = JSON.parse(JSON.stringify(testUser)) | ||
const { error, value } = schema.user.v2.validate(testCase) | ||
assert.ifError(error) | ||
assert.deepEqual(testCase, value) | ||
}) | ||
|
||
it('exports group', () => { | ||
const testCase = JSON.parse(JSON.stringify(testGroup)) | ||
const { error, value } = schema.group.v2.validate(testCase) | ||
assert.ifError(error) | ||
assert.deepEqual(testCase, value) | ||
}) | ||
|
||
it('exports nameserver', () => { | ||
const testCase = JSON.parse(JSON.stringify(testNs)) | ||
const { error } = schema.nameserver.nameserver.validate(testCase) | ||
assert.ifError(error) | ||
}) | ||
}) |
Oops, something went wrong.