@js-utils-kit/types 1.1.0 → 1.3.0
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/dist/index.cjs +3 -3
- package/dist/index.d.cts +72 -8
- package/dist/index.d.mts +72 -8
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
import { ArchiverOptions, ArchiverOptions as ArchiverOptions$1 } from "archiver";
|
|
2
2
|
|
|
3
|
+
//#region src/commit/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Metadata describing a supported commit type.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link COMMIT_TYPES}.
|
|
8
|
+
*/
|
|
9
|
+
interface CommitTypeMeta {
|
|
10
|
+
/**
|
|
11
|
+
* Conventional commit type identifier
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* - feat
|
|
15
|
+
* - fix
|
|
16
|
+
* - chore
|
|
17
|
+
* - BREAKING CHANGE.
|
|
18
|
+
*/
|
|
19
|
+
type: string;
|
|
20
|
+
/**
|
|
21
|
+
* Human-readable description of what this commit type represents.
|
|
22
|
+
*/
|
|
23
|
+
description: string;
|
|
24
|
+
/**
|
|
25
|
+
* Whether this commit type is allowed to introduce a breaking change.
|
|
26
|
+
*
|
|
27
|
+
* When true, breaking changes may be expressed using:
|
|
28
|
+
* - `!` after the type (e.g. `feat!:`)
|
|
29
|
+
* - `BREAKING CHANGE:` footer
|
|
30
|
+
*/
|
|
31
|
+
allowsBreakingChange: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether commits of this type should be considered release-relevant (e.g. included in changelogs).
|
|
34
|
+
*/
|
|
35
|
+
isReleaseRelevant?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Default semantic version impact when no breaking change is present.
|
|
38
|
+
*/
|
|
39
|
+
defaultReleaseType?: 'major' | 'minor' | 'patch' | 'none';
|
|
40
|
+
/**
|
|
41
|
+
* Display-friendly label for UIs or documentation.
|
|
42
|
+
*/
|
|
43
|
+
title?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Emoji or icon representing this commit type.
|
|
46
|
+
*/
|
|
47
|
+
icon?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Marks this commit type as deprecated.
|
|
50
|
+
*/
|
|
51
|
+
deprecated?: boolean;
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
3
54
|
//#region src/ArchiveFormat.d.ts
|
|
4
55
|
/**
|
|
5
56
|
* Supported archive formats.
|
|
@@ -55,13 +106,9 @@ interface CreateArchiveOptions {
|
|
|
55
106
|
* ```
|
|
56
107
|
*/
|
|
57
108
|
declare const Environment: {
|
|
58
|
-
/** Production environment (`"production"`) */
|
|
59
|
-
readonly
|
|
60
|
-
/**
|
|
61
|
-
readonly DEV: "development";
|
|
62
|
-
/** Testing environment (`"test"`) */
|
|
63
|
-
readonly TEST: "test";
|
|
64
|
-
/** Unknown or undefined environment */
|
|
109
|
+
/** Production environment (`"production"`) */readonly PROD: "production"; /** Development environment (`"development"`) */
|
|
110
|
+
readonly DEV: "development"; /** Testing environment (`"test"`) */
|
|
111
|
+
readonly TEST: "test"; /** Unknown or undefined environment */
|
|
65
112
|
readonly UNKNOWN: "unknown";
|
|
66
113
|
};
|
|
67
114
|
type Environment = (typeof Environment)[keyof typeof Environment];
|
|
@@ -90,6 +137,23 @@ type Falsy = false | 0 | '' | null | undefined;
|
|
|
90
137
|
*/
|
|
91
138
|
type Hour = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23;
|
|
92
139
|
//#endregion
|
|
140
|
+
//#region src/HttpStatusCode.d.ts
|
|
141
|
+
/**
|
|
142
|
+
* Union type of all supported HTTP status codes.
|
|
143
|
+
*
|
|
144
|
+
* Useful for enforcing strict type-safety when working with HTTP responses, middleware, validators, and utility functions.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* function handleStatus(code: HttpStatusCode) {
|
|
149
|
+
* if (code === HTTP_STATUS.NOT_FOUND) {
|
|
150
|
+
* // handle 404
|
|
151
|
+
* }
|
|
152
|
+
* }
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
type HttpStatusCode = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511;
|
|
156
|
+
//#endregion
|
|
93
157
|
//#region src/MinuteOrSecond.d.ts
|
|
94
158
|
/**
|
|
95
159
|
* Represents a minute or second value in time.
|
|
@@ -134,4 +198,4 @@ interface Trim {
|
|
|
134
198
|
normalizeWhitespace(str: string): string;
|
|
135
199
|
}
|
|
136
200
|
//#endregion
|
|
137
|
-
export { ArchiveFormat, ArchiverOptions, CreateArchiveOptions, Environment, Falsy, Hour, MinuteOrSecond, Trim };
|
|
201
|
+
export { ArchiveFormat, ArchiverOptions, CommitTypeMeta, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, Trim };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
import { ArchiverOptions, ArchiverOptions as ArchiverOptions$1 } from "archiver";
|
|
2
2
|
|
|
3
|
+
//#region src/commit/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Metadata describing a supported commit type.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link COMMIT_TYPES}.
|
|
8
|
+
*/
|
|
9
|
+
interface CommitTypeMeta {
|
|
10
|
+
/**
|
|
11
|
+
* Conventional commit type identifier
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* - feat
|
|
15
|
+
* - fix
|
|
16
|
+
* - chore
|
|
17
|
+
* - BREAKING CHANGE.
|
|
18
|
+
*/
|
|
19
|
+
type: string;
|
|
20
|
+
/**
|
|
21
|
+
* Human-readable description of what this commit type represents.
|
|
22
|
+
*/
|
|
23
|
+
description: string;
|
|
24
|
+
/**
|
|
25
|
+
* Whether this commit type is allowed to introduce a breaking change.
|
|
26
|
+
*
|
|
27
|
+
* When true, breaking changes may be expressed using:
|
|
28
|
+
* - `!` after the type (e.g. `feat!:`)
|
|
29
|
+
* - `BREAKING CHANGE:` footer
|
|
30
|
+
*/
|
|
31
|
+
allowsBreakingChange: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether commits of this type should be considered release-relevant (e.g. included in changelogs).
|
|
34
|
+
*/
|
|
35
|
+
isReleaseRelevant?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Default semantic version impact when no breaking change is present.
|
|
38
|
+
*/
|
|
39
|
+
defaultReleaseType?: 'major' | 'minor' | 'patch' | 'none';
|
|
40
|
+
/**
|
|
41
|
+
* Display-friendly label for UIs or documentation.
|
|
42
|
+
*/
|
|
43
|
+
title?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Emoji or icon representing this commit type.
|
|
46
|
+
*/
|
|
47
|
+
icon?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Marks this commit type as deprecated.
|
|
50
|
+
*/
|
|
51
|
+
deprecated?: boolean;
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
3
54
|
//#region src/ArchiveFormat.d.ts
|
|
4
55
|
/**
|
|
5
56
|
* Supported archive formats.
|
|
@@ -55,13 +106,9 @@ interface CreateArchiveOptions {
|
|
|
55
106
|
* ```
|
|
56
107
|
*/
|
|
57
108
|
declare const Environment: {
|
|
58
|
-
/** Production environment (`"production"`) */
|
|
59
|
-
readonly
|
|
60
|
-
/**
|
|
61
|
-
readonly DEV: "development";
|
|
62
|
-
/** Testing environment (`"test"`) */
|
|
63
|
-
readonly TEST: "test";
|
|
64
|
-
/** Unknown or undefined environment */
|
|
109
|
+
/** Production environment (`"production"`) */readonly PROD: "production"; /** Development environment (`"development"`) */
|
|
110
|
+
readonly DEV: "development"; /** Testing environment (`"test"`) */
|
|
111
|
+
readonly TEST: "test"; /** Unknown or undefined environment */
|
|
65
112
|
readonly UNKNOWN: "unknown";
|
|
66
113
|
};
|
|
67
114
|
type Environment = (typeof Environment)[keyof typeof Environment];
|
|
@@ -90,6 +137,23 @@ type Falsy = false | 0 | '' | null | undefined;
|
|
|
90
137
|
*/
|
|
91
138
|
type Hour = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23;
|
|
92
139
|
//#endregion
|
|
140
|
+
//#region src/HttpStatusCode.d.ts
|
|
141
|
+
/**
|
|
142
|
+
* Union type of all supported HTTP status codes.
|
|
143
|
+
*
|
|
144
|
+
* Useful for enforcing strict type-safety when working with HTTP responses, middleware, validators, and utility functions.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* function handleStatus(code: HttpStatusCode) {
|
|
149
|
+
* if (code === HTTP_STATUS.NOT_FOUND) {
|
|
150
|
+
* // handle 404
|
|
151
|
+
* }
|
|
152
|
+
* }
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
type HttpStatusCode = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511;
|
|
156
|
+
//#endregion
|
|
93
157
|
//#region src/MinuteOrSecond.d.ts
|
|
94
158
|
/**
|
|
95
159
|
* Represents a minute or second value in time.
|
|
@@ -134,4 +198,4 @@ interface Trim {
|
|
|
134
198
|
normalizeWhitespace(str: string): string;
|
|
135
199
|
}
|
|
136
200
|
//#endregion
|
|
137
|
-
export { ArchiveFormat, ArchiverOptions, CreateArchiveOptions, Environment, Falsy, Hour, MinuteOrSecond, Trim };
|
|
201
|
+
export { ArchiveFormat, ArchiverOptions, CommitTypeMeta, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, Trim };
|