Skip to content

Commit

Permalink
docs(assert): missing toc update (#1167)
Browse files Browse the repository at this point in the history
* docs(assert): missing toc update

* docs: rebuild
  • Loading branch information
belgattitude authored May 1, 2024
1 parent 13a4d99 commit bfd78a3
Show file tree
Hide file tree
Showing 47 changed files with 824 additions and 656 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-rockets-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@httpx/assert": patch
---

Add missing documentation in TOC
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"react-dom": "18.3.1"
},
"devDependencies": {
"@belgattitude/eslint-config-bases": "5.4.1",
"@belgattitude/eslint-config-bases": "5.5.0",
"eslint": "8.57.0",
"eslint-config-next": "14.2.3",
"eslint-plugin-tailwindcss": "3.15.1",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/assert/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ assertEan13('1234567890128');

#### isNetWorkPort

Check whether the value is a valid tcp/udp network port (>=0 ... <=65535)
Check whether the value is a valid tcp/udp network port (0-65635)

```typescript
import { isNetworkPort } from "@httpx/assert";
Expand Down
10 changes: 5 additions & 5 deletions examples/nextjs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"superjson": "2.2.1",
"zod": "3.23.4"
"zod": "3.23.5"
},
"devDependencies": {
"@belgattitude/eslint-config-bases": "5.4.0",
"@belgattitude/eslint-config-bases": "5.5.0",
"@types/node": "20.12.7",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react-swc": "3.6.0",
"@vitest/coverage-v8": "1.5.2",
"@vitest/ui": "1.5.2",
"@vitest/coverage-v8": "1.5.3",
"@vitest/ui": "1.5.3",
"cross-env": "7.0.3",
"eslint": "8.57.0",
"eslint-config-next": "14.2.3",
Expand All @@ -50,7 +50,7 @@
"vite": "5.2.10",
"vite-plugin-svgr": "4.2.0",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.5.2",
"vitest": "1.5.3",
"webpack": "5.91.0"
}
}
2 changes: 1 addition & 1 deletion integrations/prisma-exception/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.15.3",
"@belgattitude/eslint-config-bases": "5.4.1",
"@belgattitude/eslint-config-bases": "5.5.0",
"@size-limit/file": "11.1.2",
"@size-limit/webpack": "11.1.2",
"@size-limit/webpack-why": "11.1.2",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
],
"packageManager": "[email protected]",
"devDependencies": {
"@belgattitude/eslint-config-bases": "5.4.1",
"@belgattitude/eslint-config-bases": "5.5.0",
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.1",
"@commitlint/cli": "19.3.0",
Expand Down
18 changes: 17 additions & 1 deletion packages/assert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,37 @@ $ pnpm add @httpx/assert

- [Introduction](#introduction)
* [Consistent style](#consistent-style)
* [Weak opaque types](#weak-opaque-types)
* [Assertions error messages](#assertions-error-messages)
- [Usage](#usage)
* [Type related](#type-related)
+ [assertNever](#assertnever)
* [Object related](#object-related)
+ [isPlainObject](#isplainobject)
* [Number related](#number-related)
+ [isNumberSafeInt](#isnumbersafeint)
* [Array related](#array-related)
+ [ArrayNonEmpty](#arraynonempty)
* [String related](#string-related)
+ [StringNonEmpty](#stringnonempty)
+ [ParsableSafeInt](#parsablesafeint)
+ [isParsableStrictIsoDateZ](#isparsablestrictisodatez)
* [Uuid](#uuid)
+ [isUuid](#isuuid)
* [Barcode](#barcode)
+ [isEan13](#isean13)
* [Network](#network)
+ [isNetWorkPort](#isnetworkport)
* [Http](#http)
+ [isHttpMethod](#ishttpmethod)
+ [isValidHttpMethod](#isvalidhttpmethod)
- [Bundle size](#bundle-size)
- [Compatibility](#compatibility)
- [Acknowledgments](#acknowledgments)
- [Contributors](#contributors)
- [Sponsors](#sponsors)


## Introduction

### Consistent style
Expand Down Expand Up @@ -313,7 +329,7 @@ assertEan13('1234567890128');

#### isNetWorkPort

Check whether the value is a valid tcp/udp network port (>=0 ... <=65535)
Check whether the value is a valid tcp/udp network port (0-65535)

```typescript
import { isNetworkPort } from "@httpx/assert";
Expand Down
9 changes: 8 additions & 1 deletion packages/assert/docs/api/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@httpx/assert

# @httpx/assert - v0.7.0
# @httpx/assert - v0.9.0

## Table of contents

Expand All @@ -12,7 +12,14 @@
- [barcode.asserts](modules/barcode_asserts.md)
- [barcode.guards](modules/barcode_guards.md)
- [barcode.types](modules/barcode_types.md)
- [http.asserts](modules/http_asserts.md)
- [http.consts](modules/http_consts.md)
- [http.guards](modules/http_guards.md)
- [http.types](modules/http_types.md)
- [index](modules/index.md)
- [network.asserts](modules/network_asserts.md)
- [network.guards](modules/network_guards.md)
- [network.types](modules/network_types.md)
- [number.asserts](modules/number_asserts.md)
- [number.guards](modules/number_guards.md)
- [number.types](modules/number_types.md)
Expand Down
2 changes: 1 addition & 1 deletion packages/assert/docs/api/modules/array_asserts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@httpx/assert - v0.7.0](../README.md) / array.asserts
[@httpx/assert - v0.9.0](../README.md) / array.asserts

# Module: array.asserts

Expand Down
2 changes: 1 addition & 1 deletion packages/assert/docs/api/modules/array_guards.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@httpx/assert - v0.7.0](../README.md) / array.guards
[@httpx/assert - v0.9.0](../README.md) / array.guards

# Module: array.guards

Expand Down
2 changes: 1 addition & 1 deletion packages/assert/docs/api/modules/array_types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@httpx/assert - v0.7.0](../README.md) / array.types
[@httpx/assert - v0.9.0](../README.md) / array.types

# Module: array.types

Expand Down
2 changes: 1 addition & 1 deletion packages/assert/docs/api/modules/barcode_asserts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@httpx/assert - v0.7.0](../README.md) / barcode.asserts
[@httpx/assert - v0.9.0](../README.md) / barcode.asserts

# Module: barcode.asserts

Expand Down
2 changes: 1 addition & 1 deletion packages/assert/docs/api/modules/barcode_guards.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@httpx/assert - v0.7.0](../README.md) / barcode.guards
[@httpx/assert - v0.9.0](../README.md) / barcode.guards

# Module: barcode.guards

Expand Down
2 changes: 1 addition & 1 deletion packages/assert/docs/api/modules/barcode_types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@httpx/assert - v0.7.0](../README.md) / barcode.types
[@httpx/assert - v0.9.0](../README.md) / barcode.types

# Module: barcode.types

Expand Down
61 changes: 61 additions & 0 deletions packages/assert/docs/api/modules/http_asserts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[@httpx/assert - v0.9.0](../README.md) / http.asserts

# Module: http.asserts

## Table of contents

### Functions

- [assertHttpMethod](http_asserts.md#asserthttpmethod)
- [assertHttpValidMethod](http_asserts.md#asserthttpvalidmethod)

## Functions

### assertHttpMethod

**assertHttpMethod**\<`T`\>(`method`, `v`, `msgOrErrorFactory?`): asserts v is T

#### Type parameters

| Name | Type |
| :------ | :------ |
| `T` | extends [`HttpMethod`](http_types.md#httpmethod) |

#### Parameters

| Name | Type |
| :------ | :------ |
| `method` | `T` |
| `v` | `unknown` |
| `msgOrErrorFactory?` | `MsgOrErrorFactory` |

#### Returns

asserts v is T

**`Throws`**

TypeError

___

### assertHttpValidMethod

**assertHttpValidMethod**(`v`, `msgOrErrorFactory?`): asserts v is HttpMethod

Assert the value is a valid http method (case-insensitive)

#### Parameters

| Name | Type |
| :------ | :------ |
| `v` | `unknown` |
| `msgOrErrorFactory?` | `MsgOrErrorFactory` |

#### Returns

asserts v is HttpMethod

**`Throws`**

TypeError
15 changes: 15 additions & 0 deletions packages/assert/docs/api/modules/http_consts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[@httpx/assert - v0.9.0](../README.md) / http.consts

# Module: http.consts

## Table of contents

### Variables

- [httpMethods](http_consts.md#httpmethods)

## Variables

### httpMethods

`Const` **httpMethods**: readonly [``"GET"``, ``"POST"``, ``"HEAD"``, ``"PUT"``, ``"DELETE"``, ``"CONNECT"``, ``"OPTIONS"``, ``"PATCH"``, ``"TRACE"``]
52 changes: 52 additions & 0 deletions packages/assert/docs/api/modules/http_guards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[@httpx/assert - v0.9.0](../README.md) / http.guards

# Module: http.guards

## Table of contents

### Functions

- [isHttpMethod](http_guards.md#ishttpmethod)
- [isHttpValidMethod](http_guards.md#ishttpvalidmethod)

## Functions

### isHttpMethod

**isHttpMethod**\<`T`\>(`method`, `v`): v is T

#### Type parameters

| Name | Type |
| :------ | :------ |
| `T` | extends [`HttpMethod`](http_types.md#httpmethod) |

#### Parameters

| Name | Type |
| :------ | :------ |
| `method` | `T` |
| `v` | `unknown` |

#### Returns

v is T

___

### isHttpValidMethod

**isHttpValidMethod**(`v`): v is HttpMethod

Check whether the value is a valid http method (GET, PUT...) in
a case-insensitive manner.

#### Parameters

| Name | Type |
| :------ | :------ |
| `v` | `unknown` |

#### Returns

v is HttpMethod
15 changes: 15 additions & 0 deletions packages/assert/docs/api/modules/http_types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[@httpx/assert - v0.9.0](../README.md) / http.types

# Module: http.types

## Table of contents

### Type Aliases

- [HttpMethod](http_types.md#httpmethod)

## Type Aliases

### HttpMethod

Ƭ **HttpMethod**: ``"GET"`` \| ``"POST"`` \| ``"HEAD"`` \| ``"PUT"`` \| ``"DELETE"`` \| ``"CONNECT"`` \| ``"OPTIONS"`` \| ``"PATCH"`` \| ``"TRACE"``
Loading

0 comments on commit bfd78a3

Please sign in to comment.