adaptive-extender 0.9.4 → 0.9.6
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 +9 -0
- package/dist/core/portable.d.ts +28 -12
- package/dist/core/portable.js +134 -61
- package/dist/core/portable.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 0.9.6 (08.02.2026)
|
|
2
|
+
- Improved `Optional`, `Nullable`, and `ArrayOf` adapters.
|
|
3
|
+
- Added the `SetOf` adapter.
|
|
4
|
+
|
|
5
|
+
## 0.9.5 (27.01.2026)
|
|
6
|
+
- Added the ability to specify custom keys (via `DiscriminatorKey`) and values (via `Descendant`) for discriminators.
|
|
7
|
+
- Fixed an issue where static fields could be marked for porting.
|
|
8
|
+
- Improved descriptions for certain porting-related errors.
|
|
9
|
+
|
|
1
10
|
## 0.9.4 (23.01.2026)
|
|
2
11
|
- Ported models no longer automatically receive a discriminator unless they are polymorphic descendants.
|
|
3
12
|
- Improved typing for `Model.export` and its descendants in `Descendant`, ensuring that data is handled as at least an `object` type.
|
package/dist/core/portable.d.ts
CHANGED
|
@@ -52,30 +52,46 @@ export declare function Field<M, S>(type: PortableConstructor<M, S>): (target: v
|
|
|
52
52
|
*/
|
|
53
53
|
export declare function Field<M, S>(type: PortableConstructor<M, S>, name: string): (target: void, context: ClassFieldDecoratorContext<Model, M>) => void;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
56
|
-
* @param
|
|
55
|
+
* Decorator to register a descendant class in the base class's polymorphic registry.
|
|
56
|
+
* @param descendant The subclass constructor to register.
|
|
57
57
|
*/
|
|
58
|
-
export declare function
|
|
58
|
+
export declare function Descendant<M extends typeof Model>(descendant: PortableConstructor<Model, object>): (target: M, context: ClassDecoratorContext) => void;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
* @param
|
|
60
|
+
* Decorator to register a descendant class in the base class's polymorphic registry.
|
|
61
|
+
* @param descendant The subclass constructor to register.
|
|
62
|
+
* @param discriminator The custom discriminator value.
|
|
62
63
|
*/
|
|
63
|
-
export declare function
|
|
64
|
+
export declare function Descendant<M extends typeof Model>(descendant: PortableConstructor<Model, object>, discriminator: string): (target: M, context: ClassDecoratorContext) => void;
|
|
64
65
|
/**
|
|
65
|
-
*
|
|
66
|
-
* @param
|
|
66
|
+
* Decorator to register a custom discriminator key for the polymorphic model.
|
|
67
|
+
* @param key The property key to use for the discriminator.
|
|
67
68
|
*/
|
|
68
|
-
export declare function
|
|
69
|
+
export declare function DiscriminatorKey<M extends typeof Model>(key: string): (target: M, context: ClassDecoratorContext) => void;
|
|
69
70
|
/**
|
|
70
71
|
* Creates a wrapper for circular or deferred type references.
|
|
71
72
|
* @param resolver Function that returns the actual type constructor.
|
|
72
73
|
*/
|
|
73
74
|
export declare function Deferred<M, S>(resolver: (_: void) => PortableConstructor<M, S>): PortableConstructor<M, S>;
|
|
74
75
|
/**
|
|
75
|
-
*
|
|
76
|
-
* @param
|
|
76
|
+
* Creates a portable wrapper for optional types.
|
|
77
|
+
* @param type The inner portable type.
|
|
77
78
|
*/
|
|
78
|
-
export declare function
|
|
79
|
+
export declare function Optional<M, S>(type: PortableConstructor<M, S>): PortableConstructor<M | undefined, S | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a portable wrapper for nullable types.
|
|
82
|
+
* @param type The inner portable type.
|
|
83
|
+
*/
|
|
84
|
+
export declare function Nullable<M, S>(type: PortableConstructor<M, S>): PortableConstructor<M | null, S | null>;
|
|
85
|
+
/**
|
|
86
|
+
* Creates a portable wrapper for array types.
|
|
87
|
+
* @param type The portable type of the array elements.
|
|
88
|
+
*/
|
|
89
|
+
export declare function ArrayOf<M, S>(type: PortableConstructor<M, S>): PortableConstructor<M[], S[]>;
|
|
90
|
+
/**
|
|
91
|
+
* Creates a portable wrapper for set types.
|
|
92
|
+
* @param type The portable type of the set elements.
|
|
93
|
+
*/
|
|
94
|
+
export declare function SetOf<M, S>(type: PortableConstructor<M, S>): PortableConstructor<Set<M>, S[]>;
|
|
79
95
|
/**
|
|
80
96
|
* A portable adapter that facilitates the conversion between `Date` instances and millisecond timestamps.
|
|
81
97
|
*/
|
package/dist/core/portable.js
CHANGED
|
@@ -28,12 +28,29 @@ class FieldDescriptor {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
|
+
//#region Descendant descriptor
|
|
32
|
+
class DescendantDescriptor {
|
|
33
|
+
#type;
|
|
34
|
+
#discriminator;
|
|
35
|
+
constructor(type, discriminator) {
|
|
36
|
+
this.#type = type;
|
|
37
|
+
this.#discriminator = discriminator;
|
|
38
|
+
}
|
|
39
|
+
get type() {
|
|
40
|
+
return this.#type;
|
|
41
|
+
}
|
|
42
|
+
get discriminator() {
|
|
43
|
+
return this.#discriminator ?? this.#type.name;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
31
47
|
//#region Portability metadata
|
|
32
48
|
class PortabilityMetadata {
|
|
33
49
|
static #registry = new WeakMap();
|
|
34
50
|
#model;
|
|
35
51
|
#fields = new Map();
|
|
36
52
|
#descendants = [];
|
|
53
|
+
#discriminator = "$type";
|
|
37
54
|
constructor(model) {
|
|
38
55
|
this.#model = model;
|
|
39
56
|
}
|
|
@@ -55,6 +72,12 @@ class PortabilityMetadata {
|
|
|
55
72
|
get descendants() {
|
|
56
73
|
return this.#descendants;
|
|
57
74
|
}
|
|
75
|
+
get discriminator() {
|
|
76
|
+
return this.#discriminator;
|
|
77
|
+
}
|
|
78
|
+
set discriminator(value) {
|
|
79
|
+
this.#discriminator = value;
|
|
80
|
+
}
|
|
58
81
|
}
|
|
59
82
|
//#endregion
|
|
60
83
|
//#region Model
|
|
@@ -71,14 +94,17 @@ export class Model {
|
|
|
71
94
|
*/
|
|
72
95
|
static import(source, name) {
|
|
73
96
|
const model = this;
|
|
74
|
-
const { descendants } = PortabilityMetadata.read(model);
|
|
97
|
+
const { descendants, discriminator: key } = PortabilityMetadata.read(model);
|
|
75
98
|
if (descendants.length > 0) {
|
|
76
99
|
const object = Object.import(source, name);
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
100
|
+
const value = Reflect.get(object, key);
|
|
101
|
+
if (value === undefined)
|
|
102
|
+
throw new TypeError(`Missing '${key}' discriminator in ${name}`);
|
|
103
|
+
const discriminator = String.import(value, `${name}.${key}`);
|
|
104
|
+
const descriptor = descendants.find(descriptor => descriptor.discriminator === discriminator);
|
|
105
|
+
if (descriptor === undefined)
|
|
106
|
+
throw new TypeError(`Unknown '${discriminator}' discriminator for ${name}`);
|
|
107
|
+
return descriptor.type.import(source, name);
|
|
82
108
|
}
|
|
83
109
|
const object = Object.import(source, name);
|
|
84
110
|
const instance = Reflect.construct(this, []);
|
|
@@ -96,13 +122,14 @@ export class Model {
|
|
|
96
122
|
*/
|
|
97
123
|
static export(source) {
|
|
98
124
|
const model = this;
|
|
99
|
-
const { descendants } = PortabilityMetadata.read(model);
|
|
125
|
+
const { descendants, discriminator: key } = PortabilityMetadata.read(model);
|
|
100
126
|
if (descendants.length > 0) {
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
127
|
+
const descriptor = descendants.find(descriptor => source instanceof descriptor.type);
|
|
128
|
+
if (descriptor === undefined)
|
|
103
129
|
throw new TypeError(`Invalid '${typename(source)}' type for source`);
|
|
130
|
+
const descendant = descriptor.type;
|
|
104
131
|
const exported = descendant.export(source);
|
|
105
|
-
Reflect.set(exported,
|
|
132
|
+
Reflect.set(exported, key, descriptor.discriminator);
|
|
106
133
|
return exported;
|
|
107
134
|
}
|
|
108
135
|
const object = new Object();
|
|
@@ -117,6 +144,8 @@ export class Model {
|
|
|
117
144
|
}
|
|
118
145
|
export function Field(type, name) {
|
|
119
146
|
return function (_, context) {
|
|
147
|
+
if (context.static)
|
|
148
|
+
throw new TypeError("Portable fields cannot be static");
|
|
120
149
|
const key = context.name;
|
|
121
150
|
if (typeof (key) === "symbol")
|
|
122
151
|
throw new TypeError("Symbols are not supported as portable keys");
|
|
@@ -130,32 +159,42 @@ export function Field(type, name) {
|
|
|
130
159
|
});
|
|
131
160
|
};
|
|
132
161
|
}
|
|
162
|
+
export function Descendant(descendant, discriminator) {
|
|
163
|
+
return function (model) {
|
|
164
|
+
const { descendants } = PortabilityMetadata.read(model);
|
|
165
|
+
descendants.push(new DescendantDescriptor(descendant, discriminator));
|
|
166
|
+
};
|
|
167
|
+
}
|
|
133
168
|
/**
|
|
134
|
-
*
|
|
135
|
-
* @param
|
|
169
|
+
* Decorator to register a custom discriminator key for the polymorphic model.
|
|
170
|
+
* @param key The property key to use for the discriminator.
|
|
136
171
|
*/
|
|
137
|
-
export function
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
static export(source) {
|
|
143
|
-
return source.map(item => type.export(item));
|
|
144
|
-
}
|
|
172
|
+
export function DiscriminatorKey(key) {
|
|
173
|
+
return function (model) {
|
|
174
|
+
const metadata = PortabilityMetadata.read(model);
|
|
175
|
+
metadata.discriminator = key;
|
|
145
176
|
};
|
|
146
177
|
}
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region Adapters
|
|
147
180
|
/**
|
|
148
|
-
* Creates a
|
|
149
|
-
* @param
|
|
181
|
+
* Creates a wrapper for circular or deferred type references.
|
|
182
|
+
* @param resolver Function that returns the actual type constructor.
|
|
150
183
|
*/
|
|
151
|
-
export function
|
|
152
|
-
return
|
|
153
|
-
|
|
154
|
-
return
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return
|
|
158
|
-
}
|
|
184
|
+
export function Deferred(resolver) {
|
|
185
|
+
return {
|
|
186
|
+
[Symbol.hasInstance](instance) {
|
|
187
|
+
return resolver()[Symbol.hasInstance](instance);
|
|
188
|
+
},
|
|
189
|
+
get name() {
|
|
190
|
+
return resolver().name;
|
|
191
|
+
},
|
|
192
|
+
import(source, name) {
|
|
193
|
+
return resolver().import(source, name);
|
|
194
|
+
},
|
|
195
|
+
export(source) {
|
|
196
|
+
return resolver().export(source);
|
|
197
|
+
},
|
|
159
198
|
};
|
|
160
199
|
}
|
|
161
200
|
/**
|
|
@@ -163,53 +202,87 @@ export function Nullable(type) {
|
|
|
163
202
|
* @param type The inner portable type.
|
|
164
203
|
*/
|
|
165
204
|
export function Optional(type) {
|
|
166
|
-
return
|
|
167
|
-
|
|
205
|
+
return {
|
|
206
|
+
[Symbol.hasInstance](instance) {
|
|
207
|
+
return instance === undefined || type[Symbol.hasInstance](instance);
|
|
208
|
+
},
|
|
209
|
+
get name() {
|
|
210
|
+
return `${type.name} | undefined`;
|
|
211
|
+
},
|
|
212
|
+
import(source, name) {
|
|
168
213
|
return Reflect.mapUndefined(source, source => type.import(source, name));
|
|
169
|
-
}
|
|
170
|
-
|
|
214
|
+
},
|
|
215
|
+
export(source) {
|
|
171
216
|
return Reflect.mapUndefined(source, source => type.export(source));
|
|
172
|
-
}
|
|
217
|
+
},
|
|
173
218
|
};
|
|
174
219
|
}
|
|
175
220
|
/**
|
|
176
|
-
* Creates a wrapper for
|
|
177
|
-
* @param
|
|
221
|
+
* Creates a portable wrapper for nullable types.
|
|
222
|
+
* @param type The inner portable type.
|
|
178
223
|
*/
|
|
179
|
-
export function
|
|
180
|
-
return
|
|
181
|
-
|
|
182
|
-
return instance
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
return
|
|
192
|
-
}
|
|
224
|
+
export function Nullable(type) {
|
|
225
|
+
return {
|
|
226
|
+
[Symbol.hasInstance](instance) {
|
|
227
|
+
return instance === null || type[Symbol.hasInstance](instance);
|
|
228
|
+
},
|
|
229
|
+
get name() {
|
|
230
|
+
return `${type.name} | null`;
|
|
231
|
+
},
|
|
232
|
+
import(source, name) {
|
|
233
|
+
return Reflect.mapNull(source, source => type.import(source, name));
|
|
234
|
+
},
|
|
235
|
+
export(source) {
|
|
236
|
+
return Reflect.mapNull(source, source => type.export(source));
|
|
237
|
+
},
|
|
193
238
|
};
|
|
194
239
|
}
|
|
195
240
|
/**
|
|
196
|
-
*
|
|
197
|
-
* @param
|
|
241
|
+
* Creates a portable wrapper for array types.
|
|
242
|
+
* @param type The portable type of the array elements.
|
|
198
243
|
*/
|
|
199
|
-
export function
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
|
|
244
|
+
export function ArrayOf(type) {
|
|
245
|
+
return {
|
|
246
|
+
[Symbol.hasInstance](instance) {
|
|
247
|
+
return Array[Symbol.hasInstance](instance);
|
|
248
|
+
},
|
|
249
|
+
get name() {
|
|
250
|
+
return `${type.name}[]`;
|
|
251
|
+
},
|
|
252
|
+
import(source, name) {
|
|
253
|
+
return Array.import(source, name).map((item, index) => type.import(item, `${name}[${index}]`));
|
|
254
|
+
},
|
|
255
|
+
export(source) {
|
|
256
|
+
return source.map(item => type.export(item));
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Creates a portable wrapper for set types.
|
|
262
|
+
* @param type The portable type of the set elements.
|
|
263
|
+
*/
|
|
264
|
+
export function SetOf(type) {
|
|
265
|
+
return {
|
|
266
|
+
[Symbol.hasInstance](instance) {
|
|
267
|
+
return Set[Symbol.hasInstance](instance);
|
|
268
|
+
},
|
|
269
|
+
get name() {
|
|
270
|
+
return `Set<${type.name}>`;
|
|
271
|
+
},
|
|
272
|
+
import(source, name) {
|
|
273
|
+
return new Set(Array.import(source, name).map((item, index) => type.import(item, `${name}[${index}]`)));
|
|
274
|
+
},
|
|
275
|
+
export(source) {
|
|
276
|
+
return Array.from(source, item => type.export(item));
|
|
277
|
+
},
|
|
203
278
|
};
|
|
204
279
|
}
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region Adapters
|
|
207
280
|
/**
|
|
208
281
|
* A portable adapter that facilitates the conversion between `Date` instances and millisecond timestamps.
|
|
209
282
|
*/
|
|
210
283
|
export const Timestamp = {
|
|
211
284
|
[Symbol.hasInstance](instance) {
|
|
212
|
-
return instance
|
|
285
|
+
return Date[Symbol.hasInstance](instance);
|
|
213
286
|
},
|
|
214
287
|
get name() {
|
|
215
288
|
return "Timestamp";
|
|
@@ -228,7 +301,7 @@ export const Timestamp = {
|
|
|
228
301
|
*/
|
|
229
302
|
export const UnixSeconds = {
|
|
230
303
|
[Symbol.hasInstance](instance) {
|
|
231
|
-
return instance
|
|
304
|
+
return Date[Symbol.hasInstance](instance);
|
|
232
305
|
},
|
|
233
306
|
get name() {
|
|
234
307
|
return "UnixSeconds";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portable.js","sourceRoot":"","sources":["../../src/core/portable.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,YAAY,CAAC;AACpB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,EAAoB,MAAM,aAAa,CAAC;AAoB/C,YAAY;AACZ,0BAA0B;AAC1B,MAAM,eAAe;IACpB,IAAI,CAAS;IACb,YAAY,CAAS;IACrB,KAAK,CAAsB;IAE3B,YAAY,GAAW,EAAE,WAAmB,EAAE,IAAyB;QACtE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,IAAI,GAAG;QACN,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED,IAAI,WAAW;QACd,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;CACD;AACD,YAAY;AACZ,8BAA8B;AAC9B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