Skip to content

Commit

Permalink
[pack] Release (icicdr): v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
WhereJuly committed Dec 5, 2024
2 parents f4f8ee4 + fbf55aa commit 9e03659
Show file tree
Hide file tree
Showing 16 changed files with 65 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .docs/combined-usage-example.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="./images/banner-6.jpg" width="100%"/>
<img src="./images/banner-6-w1200.jpg" width="100%"/>
</div>

## Combined Usage Example
Expand Down
4 changes: 2 additions & 2 deletions .docs/headers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="./images/banner-6.jpg" width="100%"/>
<img src="./images/banner-6-w1200.jpg" width="100%"/>
</div>

## HTTP Headers Module
Expand Down Expand Up @@ -74,7 +74,7 @@ The static class that provides the HTTP Headers convenience methods for the head

##### `.make()` Method

Generates an HTTP Authorization header object {@link TAuthorizationHeaderObject} for authorization based on the specified token scheme {@link EMakerTokenSchemes}. So far only `Authorization` header with `Bearer` and `Basic` schemes implemented.
Generates an HTTP Authorization header object `TAuthorizationHeaderObject` for authorization based on the specified token scheme {@link EMakerTokenSchemes}. So far only `Authorization` header with `Bearer` and `Basic` schemes implemented.

Signature: `public static make(header: EHTTPHeaders.Authorization, scheme: EMakerTokenSchemes, token: TAuthorizationTokenValue, _maker?: unknown): TAuthorizationHeaderObject`

Expand Down
Binary file added .docs/images/autocomplete.webp
Binary file not shown.
Binary file removed .docs/images/banner-4.jpg
Binary file not shown.
Binary file removed .docs/images/banner-5.jpg
Binary file not shown.
Binary file removed .docs/images/banner-6.jpg
Binary file not shown.
Binary file removed .docs/images/banner.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion .docs/methods.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="./images/banner-6.jpg" width="100%"/>
<img src="./images/banner-6-w1200.jpg" width="100%"/>
</div>

## HTTP Methods Module
Expand Down
2 changes: 1 addition & 1 deletion .docs/mime-types.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="./images/banner-6.jpg" width="100%"/>
<img src="./images/banner-6-w1200.jpg" width="100%"/>
</div>

## HTTP MIME Types Module
Expand Down
2 changes: 1 addition & 1 deletion .docs/statuses.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="./images/banner-6.jpg" width="100%"/>
<img src="./images/banner-6-w1200.jpg" width="100%"/>
</div>

## HTTP Statuses Module
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deliver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches:
# - never # Skip the workflow for debugging purposes;
- implement/package/ci
- develop # So far build the image from develop branch;
# - master
# - implement/package/ci
- develop # Keep this for a time being
- master
# paths:
# - ".github/workflows/food-service.yml"
# - "implementation/**"
Expand Down
23 changes: 23 additions & 0 deletions .usage/demo/autocomplete.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

import { EHTTPMethods, EHTTPMethodsGroupsList, GROUPED_STATUS_CODES, HTTP_STATUSES, HTTPMethodInGroups, HTTPMethodsConvenience, HTTPStatusesConvenience } from '@wherejuly/http-convenience-pack';

/**
* NB: Autocomplete Demo
*/

// ---
const method = EHTTPMethods.HEAD;

HTTPMethodsConvenience.inGroup(method, EHTTPMethodsGroupsList.PREFLIGHT); // true

console.log(HTTPMethodInGroups.PATCH); // [EHTTPMethodsGroupsList.IDEMPOTENT]

// ---

const success = HTTP_STATUSES[200].code;

console.log(GROUPED_STATUS_CODES.clienterr);

HTTPStatusesConvenience.isAmong(success, [100]); // true

2 changes: 1 addition & 1 deletion .usage/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"noUncheckedIndexedAccess": true /* Add 'undefined' to a type when accessed using an index. */,
"skipLibCheck": true
},
"include": ["./tests"],
"include": ["./tests", "./demo"],
"exclude": ["node_modules"]
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wherejuly/http-convenience-pack",
"version": "0.0.18",
"name": "http-convenience-pack",
"version": "0.9.0",
"description": "HTTP Convenience Pack",
"author": "valentineshi.dev@gmail.com",
"type": "module",
Expand Down
50 changes: 28 additions & 22 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,28 @@
<img src="./.docs/images/banner-6-w1200.jpg" width="100%"/>
</div>

Type-safe, RFC-compliant, auto-completable HTTP constants and convenience functions to ensure standardized uniform values conveniently manipulated across your applications and services.

Use TypeScript type inference and IDE autocomplete for comfort and type safety in HTTP constants manipulations.

**Summary**

The small dependency-free, TypeScript HTTP convenience package. Exposes uniform standardized RFC-compliant type-safe auto-completable HTTP constants to apply across your applications' ends and services along with the convenience functionality (validate, normalize, is among, of group, in group, make, extract, transform etc.).

The new use cases / functionality suggestions are welcome either in [Discussions](https://github.com/WhereJuly/62-http-convenience-pack/discussions) or as [pull requests](#contribution).

**Package Status**

![Build Status](https://github.com/WhereJuly/62-http-convenience-pack/actions/workflows/deliver.yml/badge.svg)
[![codecov](https://codecov.io/gh/WhereJuly/62-http-convenience-pack/graph/badge.svg?token=N7W0Q11DRL)](https://codecov.io/gh/WhereJuly/62-http-convenience-pack)
![npm version](https://img.shields.io/npm/v/http-convenience-pack.svg)
![npm downloads](https://img.shields.io/npm/dm/http-convenience-pack.svg)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

<!-- WRITE: Will implement the badges at their time. -->
<!-- [![Dependencies](https://img.shields.io/librariesio/release/npm/package-name)](https://libraries.io/npm/package-name)
![npm version](https://img.shields.io/npm/v/http-convenience-pack.svg)
![npm downloads](https://img.shields.io/npm/dm/http-convenience-pack.svg)
![Snyk Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/your-username/your-repo.svg)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fusername%2Frepo.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fusername%2Frepo?ref=badge_shield)
![Last Commit](https://img.shields.io/github/last-commit/WhereJuly/62-http-convenience-pack.svg)
![License](https://img.shields.io/npm/l/http-convenience-pack.svg) -->
-->

The package is in a usage-ready state, no pending functionality. It is actively maintained. It moves to production-ready `>= v1.0.0` as the initial usage feedback confirms it has no major missing use cases.
<small>The package is in a usage-ready state, no pending functionality. It is actively maintained. It moves to production-ready `>= v1.0.0` as the initial usage feedback confirms it has no major missing use cases.</small>

# HTTP Convenience Pack

Expand All @@ -48,10 +45,11 @@ On top it has functionality that allows manipulating the application HTTP variab
- [Installation](#installation)
- [Autocomplete Demo](#autocomplete-demo)
- [Combined Usage Example](#combined-usage-example)
- [HTTP Methods](#http-methods)
- [HTTP Statuses](#http-statuses)
- [HTTP MIME Types](#http-mime-types)
- [HTTP Headers](#http-headers)
- [Modules](#modules)
- [HTTP Methods](#http-methods)
- [HTTP Statuses](#http-statuses)
- [HTTP MIME Types](#http-mime-types)
- [HTTP Headers](#http-headers)
- [Maintenance](#maintenance)
- [Changelog](#changelog)
- [Roadmap](#roadmap)
Expand All @@ -66,7 +64,7 @@ The package is carefully documented for comfortable developer experience.

From the good-named identifiers in code, thought-out autocompletion (see animated GIF [demo](#autocomplete-demo)), hover-popup doc blocks with usage examples on enums, constants classes and methods accessible with on-hover or `Ctrl-Left-click` when integrated with your IDE TypeScript setup (e.g. see [VS Code](https://code.visualstudio.com/Docs/languages/typescript)) to the detailed readme with use cases and the dedicated modules' API references.

As well there is a GitHub [Discussion](https://github.com/WhereJuly/62-http-convenience-pack/discussions) available for question, as the usual GitHub [Issues](https://github.com/WhereJuly/62-http-convenience-pack/issues) for bug reporting.
As well there is a GitHub [Discussion](https://github.com/WhereJuly/62-http-convenience-pack/discussions) available for question and requests, as the usual GitHub [Issues](https://github.com/WhereJuly/62-http-convenience-pack/issues) for bug reporting.

**Code Conventions**

Expand All @@ -90,18 +88,26 @@ npm install http-convenience-pack

#### Autocomplete Demo

> Here make and insert the GIF with all autocomplete demonstrations.
> Hide the demo under details tag not to annoy
Here is the short demo. The autocomplete works on all published API members. See the respective API References in the modules dedicated documentation.

<details>
<summary>Watch</summary>
<div align="center">
<img src="./.docs/images/autocomplete.webp" width="100%"/>
</div>
</details>

#### [Combined Usage Example](.docs/combined-usage-example.md)

## [HTTP Methods](.docs/methods.md)
## Modules

### [HTTP Methods](.docs/methods.md)

## [HTTP Statuses](.docs/statuses.md)
### [HTTP Statuses](.docs/statuses.md)

## [HTTP MIME Types](.docs/mime-types.md)
### [HTTP MIME Types](.docs/mime-types.md)

## [HTTP Headers](.docs/headers.md)
### [HTTP Headers](.docs/headers.md)

## Maintenance

Expand All @@ -111,13 +117,13 @@ Will come with public updates.

### Roadmap

Potentially valuable use cases / functionality suggestions are welcome either in [Discussions](https://github.com/WhereJuly/62-http-convenience-pack/discussions) or as [pull requests](#contribution).

Will appear here when available.

### Contributions

If there is contribution, I would receive it on `integration` branch for discussion and manual approval.
Potentially valuable use cases / functionality suggestions are welcome either in [Discussions](https://github.com/WhereJuly/62-http-convenience-pack/discussions) or as [pull requests](#contribution).

If there is a Pull Request contribution, I would receive it on `integration` branch for discussion and manual merge.

### License

Expand Down

0 comments on commit 9e03659

Please sign in to comment.