nhb-toolbox 4.14.0 → 4.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -57,7 +57,18 @@
57
57
 
58
58
  ---
59
59
 
60
- ## Install
60
+ ## Installation
61
+
62
+ `nhb-toolbox` is published to two package registries:
63
+
64
+ - **NPM Registry** (default public registry)
65
+ - **GitHub Packages** (GitHub’s package registry, scoped package)
66
+
67
+ ---
68
+
69
+ ### Installing from NPM Registry (default)
70
+
71
+ This is the simplest way to install and requires no additional setup.
61
72
 
62
73
  Choose your preferred package manager:
63
74
 
@@ -73,6 +84,109 @@ pnpm add nhb-toolbox
73
84
  yarn add nhb-toolbox
74
85
  ```
75
86
 
87
+ > Use this if you want the stable public version without extra config.
88
+
89
+ ---
90
+
91
+ <details>
92
+
93
+ <summary>
94
+
95
+ ### Installing from GitHub Packages
96
+
97
+ </summary>
98
+
99
+ GitHub Packages requires authentication and scoped package names.
100
+
101
+ #### Step 1: Authenticate with GitHub Packages
102
+
103
+ Create or use a **GitHub Personal Access Token (PAT)** with `read:packages` permission.
104
+
105
+ Add the following to your project’s `.npmrc` file (create if it doesn’t exist):
106
+
107
+ ```ini
108
+ @nazmul-nhb:registry=https://npm.pkg.github.com
109
+ //npm.pkg.github.com/:_authToken=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN
110
+ ```
111
+
112
+ > Replace `YOUR_GITHUB_PERSONAL_ACCESS_TOKEN` with your actual token.
113
+
114
+ #### Step 2: Install the package with scoped name
115
+
116
+ Choose your preferred package manager:
117
+
118
+ ```shell
119
+ npm i @nazmul-nhb/nhb-toolbox
120
+ ```
121
+
122
+ ```shell
123
+ pnpm add @nazmul-nhb/nhb-toolbox
124
+ ```
125
+
126
+ ```shell
127
+ yarn add @nazmul-nhb/nhb-toolbox
128
+ ```
129
+
130
+ ---
131
+
132
+ #### Where do consumers get the GitHub token?
133
+
134
+ - **The token is personal and private** — *each consumer must create own*.
135
+
136
+ - Your **GitHub Personal Access Token (PAT)** **should never be shared publicly or with consumers**.
137
+
138
+ ---
139
+
140
+ #### How consumers create own token
141
+
142
+ 1. **Go to GitHub account settings** → **Developer settings** → **Personal access tokens** → **Tokens (classic)**.
143
+
144
+ 2. Click **Generate new token**, then:
145
+
146
+ - Give it a name (e.g., `npm package read access`).
147
+
148
+ - Set expiration as prefer.
149
+
150
+ - **Enable only the `read:packages` permission** (to allow reading packages).
151
+
152
+ 3. Generate the token and **copy it immediately** — won't see it again.
153
+
154
+ ---
155
+
156
+ #### What should consumers do with the token?
157
+
158
+ - Add it to `.npmrc` file (or environment) to authenticate with GitHub Packages.
159
+
160
+ Example `.npmrc` snippet:
161
+
162
+ ```ini
163
+ @nazmul-nhb:registry=https://npm.pkg.github.com
164
+ //npm.pkg.github.com/:_authToken=PERSONAL_ACCESS_TOKEN_HERE
165
+ ```
166
+
167
+ </details>
168
+
169
+ ---
170
+
171
+ ### Summary
172
+
173
+ | Registry | Package Name | Registry URL | Requires Auth? |
174
+ | --------------- | ------------------------- | -------------------------------------------------------- | ------------------------------ |
175
+ | NPM Registry | `nhb-toolbox` | [https://registry.npmjs.org](https://registry.npmjs.org) | No |
176
+ | GitHub Packages | `@nazmul-nhb/nhb-toolbox` | [https://npm.pkg.github.com](https://npm.pkg.github.com) | Yes (PAT with `read:packages`) |
177
+
178
+ ---
179
+
180
+ If you want to use both, just configure `.npmrc` accordingly and install the appropriate package name depending on your needs.
181
+
182
+ ---
183
+
184
+ ### Notes
185
+
186
+ - The GitHub Packages version may include pre-release or private builds.
187
+ - NPM Registry version is the recommended default for most users.
188
+ - You can safely use either registry depending on your environment.
189
+
76
190
  ---
77
191
 
78
192
  ## Changelog
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HTTP_STATUS_CODES = exports.HTTP_STATUS_DATA = void 0;
4
4
  /** Data for HTTP Status Codes */
5
- exports.HTTP_STATUS_DATA = [
5
+ exports.HTTP_STATUS_DATA = Object.freeze([
6
6
  {
7
7
  category: 'informational',
8
8
  link: 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/100',
@@ -570,9 +570,9 @@ exports.HTTP_STATUS_DATA = [
570
570
  message: 'Network Authentication Required',
571
571
  description: 'Indicates that the client needs to authenticate to gain network access.',
572
572
  },
573
- ];
573
+ ]);
574
574
  /** List of HTTP Status Names with Corresponding Codes */
575
- exports.HTTP_STATUS_CODES = {
575
+ exports.HTTP_STATUS_CODES = Object.freeze({
576
576
  /**
577
577
  * * {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/100 Continue}
578
578
  * - This interim response indicates that the client should continue the request or ignore the response if the request is already finished.
@@ -892,4 +892,4 @@ exports.HTTP_STATUS_CODES = {
892
892
  * - Indicates that the client needs to authenticate to gain network access.
893
893
  */
894
894
  NETWORK_AUTHENTICATION_REQUIRED: 511,
895
- };
895
+ });
@@ -505,7 +505,7 @@ export declare const HTTP_STATUS_DATA: readonly [{
505
505
  readonly description: "Indicates that the client needs to authenticate to gain network access.";
506
506
  }];
507
507
  /** List of HTTP Status Names with Corresponding Codes */
508
- export declare const HTTP_STATUS_CODES: {
508
+ export declare const HTTP_STATUS_CODES: Readonly<{
509
509
  /**
510
510
  * * {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/100 Continue}
511
511
  * - This interim response indicates that the client should continue the request or ignore the response if the request is already finished.
@@ -825,5 +825,5 @@ export declare const HTTP_STATUS_CODES: {
825
825
  * - Indicates that the client needs to authenticate to gain network access.
826
826
  */
827
827
  readonly NETWORK_AUTHENTICATION_REQUIRED: 511;
828
- };
828
+ }>;
829
829
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/http-status/constants.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AGG;;IAEH;;;;;;;OAOG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;EAEO,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /** Data for HTTP Status Codes */
2
- export const HTTP_STATUS_DATA = [
2
+ export const HTTP_STATUS_DATA = /* @__PURE__ */ Object.freeze([
3
3
  {
4
4
  category: 'informational',
5
5
  link: 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/100',
@@ -567,9 +567,9 @@ export const HTTP_STATUS_DATA = [
567
567
  message: 'Network Authentication Required',
568
568
  description: 'Indicates that the client needs to authenticate to gain network access.',
569
569
  },
570
- ];
570
+ ]);
571
571
  /** List of HTTP Status Names with Corresponding Codes */
572
- export const HTTP_STATUS_CODES = {
572
+ export const HTTP_STATUS_CODES = /* @__PURE__ */ Object.freeze({
573
573
  /**
574
574
  * * {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/100 Continue}
575
575
  * - This interim response indicates that the client should continue the request or ignore the response if the request is already finished.
@@ -889,4 +889,4 @@ export const HTTP_STATUS_CODES = {
889
889
  * - Indicates that the client needs to authenticate to gain network access.
890
890
  */
891
891
  NETWORK_AUTHENTICATION_REQUIRED: 511,
892
- };
892
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nhb-toolbox",
3
- "version": "4.14.0",
3
+ "version": "4.14.2",
4
4
  "description": "A versatile collection of smart, efficient, and reusable utility functions and classes for everyday development needs.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",