mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 21:31:48 +01:00
feat: add build:check npm script
This commit is contained in:
parent
b18eec513a
commit
2a821b58ec
@ -9,7 +9,7 @@
|
||||
"clean": "rimraf ./dist",
|
||||
"prebuild": "npm run lint",
|
||||
"build": "npm run clean && tsc",
|
||||
"lint": "eslint ./src --ext .ts",
|
||||
"build:check": "tsc --noEmit",
|
||||
"lint:fix": "npm run lint -- --fix",
|
||||
"db:migrate": "knex migrate:latest",
|
||||
"db:migrate:rollback": "knex migrate:rollback",
|
||||
|
@ -105,16 +105,16 @@ describe('NIP-01', () => {
|
||||
{ message: 'is required', transform: omit(['tags']), },
|
||||
{ message: 'must contain less than or equal to 500 items', transform: assocPath(['tags'], range(0, 501).map(() => (['x', 'x']))) },
|
||||
],
|
||||
'tags[0]': [
|
||||
tag: [
|
||||
{ message: 'must be an array', transform: assocPath(['tags', 0], null), },
|
||||
{ message: 'must contain less than or equal to 10 items', transform: assocPath(['tags', 0], range(0, 11).map(() => 'x')) },
|
||||
],
|
||||
'tags[0][0]': [
|
||||
identifier: [
|
||||
{ message: 'must be a string', transform: assocPath(['tags', 0, 0], null), },
|
||||
{ message: 'length must be less than or equal to 255 characters long', transform: assocPath(['tags', 0, 0], ' '.repeat(256)), },
|
||||
{ message: 'is not allowed to be empty', transform: assocPath(['tags', 0, 0], ''), },
|
||||
],
|
||||
'tags[0][1]': [
|
||||
value: [
|
||||
{ message: 'must be a string', transform: assocPath(['tags', 0, 1], null), },
|
||||
{ message: 'length must be less than or equal to 1024 characters long', transform: assocPath(['tags', 0, 1], ' '.repeat(1024 + 1)), },
|
||||
],
|
||||
|
@ -33,7 +33,7 @@ describe('NIP-01', () => {
|
||||
{ message: 'must be an array', transform: assocPath(['ids'], null), },
|
||||
{ message: 'must contain less than or equal to 256 items', transform: assocPath(['ids'], range(0, 257).map(() => 'f')), },
|
||||
],
|
||||
'ids[0]': [
|
||||
prefixOrId: [
|
||||
{ message: 'length must be less than or equal to 64 characters long', transform: assocPath(['ids', 0], 'f'.repeat(65)), },
|
||||
{ message: 'must only contain hexadecimal characters', transform: assocPath(['ids', 0], 'not hex'), },
|
||||
{ message: 'is not allowed to be empty', transform: assocPath(['ids', 0], ''), },
|
||||
@ -42,7 +42,7 @@ describe('NIP-01', () => {
|
||||
{ message: 'must be an array', transform: assocPath(['authors'], null), },
|
||||
{ message: 'must contain less than or equal to 256 items', transform: assocPath(['authors'], range(0, 257).map(() => 'f')), },
|
||||
],
|
||||
'authors[0]': [
|
||||
prefixOrAuthor: [
|
||||
{ message: 'length must be less than or equal to 64 characters long', transform: assocPath(['authors', 0], 'f'.repeat(65)), },
|
||||
{ message: 'must only contain hexadecimal characters', transform: assocPath(['authors', 0], 'not hex'), },
|
||||
{ message: 'is not allowed to be empty', transform: assocPath(['authors', 0], ''), },
|
||||
@ -51,7 +51,7 @@ describe('NIP-01', () => {
|
||||
{ message: 'must be an array', transform: assocPath(['kinds'], null), },
|
||||
{ message: 'must contain less than or equal to 20 items', transform: assocPath(['kinds'], range(0, 21).map(() => 1)), },
|
||||
],
|
||||
'kinds[0]': [
|
||||
kind: [
|
||||
{ message: 'must be greater than or equal to 0', transform: assocPath(['kinds', 0], -1), },
|
||||
{ message: 'must be a number', transform: assocPath(['kinds', 0], null), },
|
||||
{ message: 'must be a multiple of 1', transform: assocPath(['kinds', 0], Math.PI), },
|
||||
|
Loading…
x
Reference in New Issue
Block a user