@blueprint-ts/core 4.0.0-beta.1 → 4.0.0-beta.3
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## v4.0.0-beta.3 - 2026-02-26 (beta)
|
|
2
|
+
|
|
3
|
+
# [4.0.0-beta.3](/compare/v4.0.0-beta.2...v4.0.0-beta.3) (2026-02-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Make PropertyAwareArray nominal to avoid array type confusion b68b6fe
|
|
9
|
+
## v4.0.0-beta.2 - 2026-02-26 (beta)
|
|
10
|
+
|
|
11
|
+
# [4.0.0-beta.2](/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2026-02-26)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* Loosen typeing in FormDataFactory.ts fed4475
|
|
1
17
|
## v4.0.0-beta.1 - 2026-02-26 (beta)
|
|
2
18
|
|
|
3
19
|
# [4.0.0-beta.1](/compare/v3.0.1...v4.0.0-beta.1) (2026-02-26)
|
package/package.json
CHANGED
|
@@ -3,10 +3,13 @@ import { type BodyFactoryContract } from '../contracts/BodyFactoryContract'
|
|
|
3
3
|
import { type BodyContract } from '../contracts/BodyContract'
|
|
4
4
|
|
|
5
5
|
type FormDataPrimitive = string | number | boolean | null | Date | Blob
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
export type FormDataValue = FormDataPrimitive | FormDataValue[] | { [key: string]: FormDataValue }
|
|
7
8
|
|
|
8
9
|
export class FormDataFactory<
|
|
9
|
-
RequestBodyInterface extends
|
|
10
|
+
RequestBodyInterface extends {
|
|
11
|
+
[K in keyof RequestBodyInterface]: FormDataValue | undefined
|
|
12
|
+
}
|
|
10
13
|
> implements BodyFactoryContract<RequestBodyInterface> {
|
|
11
14
|
public make(body: RequestBodyInterface): BodyContract {
|
|
12
15
|
return new FormDataBody<RequestBodyInterface>(body)
|
|
@@ -23,12 +23,17 @@ export type PropertyAware<T> = {
|
|
|
23
23
|
* computed getters/setters, error tracking, and dirty flags.
|
|
24
24
|
*/
|
|
25
25
|
export class PropertyAwareArray<T = unknown> extends Array<T> {
|
|
26
|
+
// Private brand to prevent plain arrays from being assignable to PropertyAwareArray.
|
|
27
|
+
// This keeps conditional types from treating normal arrays as property-aware.
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-private-class-members
|
|
29
|
+
private readonly __propertyAwareArrayBrand!: void
|
|
26
30
|
/**
|
|
27
31
|
* Creates a new PropertyAwareArray instance
|
|
28
32
|
*/
|
|
29
33
|
public constructor(items: T[] = []) {
|
|
30
34
|
// Call Array constructor with array length
|
|
31
35
|
super()
|
|
36
|
+
void this.__propertyAwareArrayBrand
|
|
32
37
|
|
|
33
38
|
// Add items to the array
|
|
34
39
|
if (items && items.length) {
|