velocious 1.0.432 → 1.0.434
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/build/configuration-types.js +1 -1
- package/build/database/record/index.js +89 -40
- package/build/environment-handlers/node/cli/commands/generate/frontend-models.js +5 -5
- package/build/frontend-model-resource/base-resource.js +6 -2
- package/build/frontend-models/resource-definition.js +3 -3
- package/build/frontend-models/websocket-publishers.js +6 -6
- package/build/src/configuration-types.d.ts +5 -3
- package/build/src/configuration-types.d.ts.map +1 -1
- package/build/src/configuration-types.js +2 -2
- package/build/src/database/record/index.d.ts +64 -19
- package/build/src/database/record/index.d.ts.map +1 -1
- package/build/src/database/record/index.js +86 -38
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts +10 -10
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.js +6 -6
- package/build/src/frontend-model-resource/base-resource.d.ts +8 -3
- package/build/src/frontend-model-resource/base-resource.d.ts.map +1 -1
- package/build/src/frontend-model-resource/base-resource.js +6 -3
- package/build/src/frontend-models/resource-definition.d.ts +6 -7
- package/build/src/frontend-models/resource-definition.d.ts.map +1 -1
- package/build/src/frontend-models/resource-definition.js +4 -4
- package/build/src/frontend-models/websocket-publishers.js +7 -7
- package/package.json +2 -2
- package/src/configuration-types.js +1 -1
- package/src/database/record/index.js +89 -40
- package/src/environment-handlers/node/cli/commands/generate/frontend-models.js +5 -5
- package/src/frontend-model-resource/base-resource.js +6 -2
- package/src/frontend-models/resource-definition.js +3 -3
- package/src/frontend-models/websocket-publishers.js +6 -6
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
*/
|
|
293
293
|
|
|
294
294
|
/**
|
|
295
|
-
* @typedef {typeof import("./frontend-model-resource/base-resource.js").default} FrontendModelResourceClassType
|
|
295
|
+
* @typedef {Omit<typeof import("./frontend-model-resource/base-resource.js").default, never> & {new (args: ConstructorParameters<typeof import("./frontend-model-resource/base-resource.js").default>[0]): import("./frontend-model-resource/base-resource.js").default}} FrontendModelResourceClassType
|
|
296
296
|
*/
|
|
297
297
|
|
|
298
298
|
/**
|
|
@@ -7,7 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* LifecycleCallbackType type.
|
|
10
|
-
* @
|
|
10
|
+
* @template {VelociousDatabaseRecord} [T=VelociousDatabaseRecord]
|
|
11
|
+
* @typedef {((model: T) => void | Promise<void>) | string} LifecycleCallbackType
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Model class constructor type used for static `this` typing.
|
|
16
|
+
* @template {VelociousDatabaseRecord} T
|
|
17
|
+
* @typedef {{new (...args: Array<never>): T}} ModelConstructor
|
|
11
18
|
*/
|
|
12
19
|
|
|
13
20
|
import timeout from "awaitery/build/timeout.js"
|
|
@@ -428,83 +435,101 @@ class VelociousDatabaseRecord {
|
|
|
428
435
|
|
|
429
436
|
/**
|
|
430
437
|
* Runs before validation.
|
|
431
|
-
* @
|
|
438
|
+
* @template {VelociousDatabaseRecord} T
|
|
439
|
+
* @this {ModelConstructor<T> & typeof VelociousDatabaseRecord}
|
|
440
|
+
* @param {LifecycleCallbackType<T>} callback - Callback function or instance method name.
|
|
432
441
|
* @returns {void}
|
|
433
442
|
*/
|
|
434
443
|
static beforeValidation(callback) {
|
|
435
|
-
this.registerLifecycleCallback("beforeValidation", callback)
|
|
444
|
+
this.registerLifecycleCallback("beforeValidation", /** @type {LifecycleCallbackType} */ (callback))
|
|
436
445
|
}
|
|
437
446
|
|
|
438
447
|
/**
|
|
439
448
|
* Runs before save.
|
|
440
|
-
* @
|
|
449
|
+
* @template {VelociousDatabaseRecord} T
|
|
450
|
+
* @this {ModelConstructor<T> & typeof VelociousDatabaseRecord}
|
|
451
|
+
* @param {LifecycleCallbackType<T>} callback - Callback function or instance method name.
|
|
441
452
|
* @returns {void}
|
|
442
453
|
*/
|
|
443
454
|
static beforeSave(callback) {
|
|
444
|
-
this.registerLifecycleCallback("beforeSave", callback)
|
|
455
|
+
this.registerLifecycleCallback("beforeSave", /** @type {LifecycleCallbackType} */ (callback))
|
|
445
456
|
}
|
|
446
457
|
|
|
447
458
|
/**
|
|
448
459
|
* Runs before create.
|
|
449
|
-
* @
|
|
460
|
+
* @template {VelociousDatabaseRecord} T
|
|
461
|
+
* @this {ModelConstructor<T> & typeof VelociousDatabaseRecord}
|
|
462
|
+
* @param {LifecycleCallbackType<T>} callback - Callback function or instance method name.
|
|
450
463
|
* @returns {void}
|
|
451
464
|
*/
|
|
452
465
|
static beforeCreate(callback) {
|
|
453
|
-
this.registerLifecycleCallback("beforeCreate", callback)
|
|
466
|
+
this.registerLifecycleCallback("beforeCreate", /** @type {LifecycleCallbackType} */ (callback))
|
|
454
467
|
}
|
|
455
468
|
|
|
456
469
|
/**
|
|
457
470
|
* Runs before update.
|
|
458
|
-
* @
|
|
471
|
+
* @template {VelociousDatabaseRecord} T
|
|
472
|
+
* @this {ModelConstructor<T> & typeof VelociousDatabaseRecord}
|
|
473
|
+
* @param {LifecycleCallbackType<T>} callback - Callback function or instance method name.
|
|
459
474
|
* @returns {void}
|
|
460
475
|
*/
|
|
461
476
|
static beforeUpdate(callback) {
|
|
462
|
-
this.registerLifecycleCallback("beforeUpdate", callback)
|
|
477
|
+
this.registerLifecycleCallback("beforeUpdate", /** @type {LifecycleCallbackType} */ (callback))
|
|
463
478
|
}
|
|
464
479
|
|
|
465
480
|
/**
|
|
466
481
|
* Runs before destroy.
|
|
467
|
-
* @
|
|
482
|
+
* @template {VelociousDatabaseRecord} T
|
|
483
|
+
* @this {ModelConstructor<T> & typeof VelociousDatabaseRecord}
|
|
484
|
+
* @param {LifecycleCallbackType<T>} callback - Callback function or instance method name.
|
|
468
485
|
* @returns {void}
|
|
469
486
|
*/
|
|
470
487
|
static beforeDestroy(callback) {
|
|
471
|
-
this.registerLifecycleCallback("beforeDestroy", callback)
|
|
488
|
+
this.registerLifecycleCallback("beforeDestroy", /** @type {LifecycleCallbackType} */ (callback))
|
|
472
489
|
}
|
|
473
490
|
|
|
474
491
|
/**
|
|
475
492
|
* Runs after save.
|
|
476
|
-
* @
|
|
493
|
+
* @template {VelociousDatabaseRecord} T
|
|
494
|
+
* @this {ModelConstructor<T> & typeof VelociousDatabaseRecord}
|
|
495
|
+
* @param {LifecycleCallbackType<T>} callback - Callback function or instance method name.
|
|
477
496
|
* @returns {void}
|
|
478
497
|
*/
|
|
479
498
|
static afterSave(callback) {
|
|
480
|
-
this.registerLifecycleCallback("afterSave", callback)
|
|
499
|
+
this.registerLifecycleCallback("afterSave", /** @type {LifecycleCallbackType} */ (callback))
|
|
481
500
|
}
|
|
482
501
|
|
|
483
502
|
/**
|
|
484
503
|
* Runs after create.
|
|
485
|
-
* @
|
|
504
|
+
* @template {VelociousDatabaseRecord} T
|
|
505
|
+
* @this {ModelConstructor<T> & typeof VelociousDatabaseRecord}
|
|
506
|
+
* @param {LifecycleCallbackType<T>} callback - Callback function or instance method name.
|
|
486
507
|
* @returns {void}
|
|
487
508
|
*/
|
|
488
509
|
static afterCreate(callback) {
|
|
489
|
-
this.registerLifecycleCallback("afterCreate", callback)
|
|
510
|
+
this.registerLifecycleCallback("afterCreate", /** @type {LifecycleCallbackType} */ (callback))
|
|
490
511
|
}
|
|
491
512
|
|
|
492
513
|
/**
|
|
493
514
|
* Runs after update.
|
|
494
|
-
* @
|
|
515
|
+
* @template {VelociousDatabaseRecord} T
|
|
516
|
+
* @this {ModelConstructor<T> & typeof VelociousDatabaseRecord}
|
|
517
|
+
* @param {LifecycleCallbackType<T>} callback - Callback function or instance method name.
|
|
495
518
|
* @returns {void}
|
|
496
519
|
*/
|
|
497
520
|
static afterUpdate(callback) {
|
|
498
|
-
this.registerLifecycleCallback("afterUpdate", callback)
|
|
521
|
+
this.registerLifecycleCallback("afterUpdate", /** @type {LifecycleCallbackType} */ (callback))
|
|
499
522
|
}
|
|
500
523
|
|
|
501
524
|
/**
|
|
502
525
|
* Runs after destroy.
|
|
503
|
-
* @
|
|
526
|
+
* @template {VelociousDatabaseRecord} T
|
|
527
|
+
* @this {ModelConstructor<T> & typeof VelociousDatabaseRecord}
|
|
528
|
+
* @param {LifecycleCallbackType<T>} callback - Callback function or instance method name.
|
|
504
529
|
* @returns {void}
|
|
505
530
|
*/
|
|
506
531
|
static afterDestroy(callback) {
|
|
507
|
-
this.registerLifecycleCallback("afterDestroy", callback)
|
|
532
|
+
this.registerLifecycleCallback("afterDestroy", /** @type {LifecycleCallbackType} */ (callback))
|
|
508
533
|
}
|
|
509
534
|
|
|
510
535
|
/**
|
|
@@ -3673,9 +3698,12 @@ class VelociousDatabaseRecord {
|
|
|
3673
3698
|
*/
|
|
3674
3699
|
readColumn(attributeName) {
|
|
3675
3700
|
this.getModelClass()._assertHasBeenInitialized()
|
|
3701
|
+
const belongsToChanges = this._belongsToChanges()
|
|
3676
3702
|
let result
|
|
3677
3703
|
|
|
3678
|
-
if (attributeName in
|
|
3704
|
+
if (attributeName in belongsToChanges) {
|
|
3705
|
+
result = belongsToChanges[attributeName]
|
|
3706
|
+
} else if (attributeName in this._changes) {
|
|
3679
3707
|
result = this._changes[attributeName]
|
|
3680
3708
|
} else if (attributeName in this._attributes) {
|
|
3681
3709
|
result = this._attributes[attributeName]
|
|
@@ -3819,8 +3847,6 @@ class VelociousDatabaseRecord {
|
|
|
3819
3847
|
throw new Error(`No insertSql on ${this.getModelClass().connection().constructor.name}`)
|
|
3820
3848
|
}
|
|
3821
3849
|
|
|
3822
|
-
const createdAtColumn = this.getModelClass().getColumns().find((column) => column.getName() == "created_at")
|
|
3823
|
-
const updatedAtColumn = this.getModelClass().getColumns().find((column) => column.getName() == "updated_at")
|
|
3824
3850
|
const data = Object.assign({}, this._belongsToChanges(), this.rawAttributes())
|
|
3825
3851
|
const primaryKey = this.getModelClass().primaryKey()
|
|
3826
3852
|
const primaryKeyColumn = this.getModelClass().getColumns().find((column) => column.getName() == primaryKey)
|
|
@@ -3828,14 +3854,7 @@ class VelociousDatabaseRecord {
|
|
|
3828
3854
|
const driverSupportsDefaultUUID = typeof this._connection().supportsDefaultPrimaryKeyUUID == "function" && this._connection().supportsDefaultPrimaryKeyUUID()
|
|
3829
3855
|
const isUUIDPrimaryKey = primaryKeyType?.includes("uuid")
|
|
3830
3856
|
const shouldAssignUUIDPrimaryKey = isUUIDPrimaryKey && !driverSupportsDefaultUUID
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
if (createdAtColumn && (data.created_at === undefined || data.created_at === null || data.created_at === "")) {
|
|
3834
|
-
data.created_at = currentDate
|
|
3835
|
-
}
|
|
3836
|
-
if (updatedAtColumn && (data.updated_at === undefined || data.updated_at === null || data.updated_at === "")) {
|
|
3837
|
-
data.updated_at = currentDate
|
|
3838
|
-
}
|
|
3857
|
+
this._setDefaultTimestampValues(data)
|
|
3839
3858
|
|
|
3840
3859
|
const columnNames = this.getModelClass().getColumnNames()
|
|
3841
3860
|
const hasUserProvidedPrimaryKey = data[primaryKey] !== undefined && data[primaryKey] !== null && data[primaryKey] !== ""
|
|
@@ -3853,6 +3872,31 @@ class VelociousDatabaseRecord {
|
|
|
3853
3872
|
})
|
|
3854
3873
|
const insertResult = await this._connection().query(sql, {logName: `${this.getModelClass().name} Create`})
|
|
3855
3874
|
|
|
3875
|
+
await this._applyInsertResult({data, insertResult, primaryKey, primaryKeyType})
|
|
3876
|
+
this.setIsNewRecord(false)
|
|
3877
|
+
|
|
3878
|
+
// Mark all relationships as preloaded, since we don't expect anything to have magically appeared since we created the record.
|
|
3879
|
+
for (const relationship of this.getModelClass().getRelationships()) {
|
|
3880
|
+
const instanceRelationship = this.getRelationshipByName(relationship.getRelationshipName())
|
|
3881
|
+
|
|
3882
|
+
if (instanceRelationship.getType() == "hasMany" && instanceRelationship.getLoadedOrUndefined() === null) {
|
|
3883
|
+
instanceRelationship.setLoaded([])
|
|
3884
|
+
}
|
|
3885
|
+
|
|
3886
|
+
instanceRelationship.setPreloaded(true)
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
/**
|
|
3891
|
+
* Applies the database insert response to this record.
|
|
3892
|
+
* @param {object} options - Insert result options.
|
|
3893
|
+
* @param {Record<string, ?>} options.data - Inserted data.
|
|
3894
|
+
* @param {?} options.insertResult - Result returned from the connection.
|
|
3895
|
+
* @param {string} options.primaryKey - Primary key column name.
|
|
3896
|
+
* @param {string | undefined} options.primaryKeyType - Primary key column type.
|
|
3897
|
+
* @returns {Promise<void>} - Resolves when complete.
|
|
3898
|
+
*/
|
|
3899
|
+
async _applyInsertResult({data, insertResult, primaryKey, primaryKeyType}) {
|
|
3856
3900
|
if (Array.isArray(insertResult) && insertResult[0] && insertResult[0][primaryKey]) {
|
|
3857
3901
|
this._attributes = insertResult[0]
|
|
3858
3902
|
this._changes = {}
|
|
@@ -3864,18 +3908,23 @@ class VelociousDatabaseRecord {
|
|
|
3864
3908
|
|
|
3865
3909
|
await this._reloadWithId(id)
|
|
3866
3910
|
}
|
|
3911
|
+
}
|
|
3867
3912
|
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3913
|
+
/**
|
|
3914
|
+
* Sets timestamp defaults for a new record insert.
|
|
3915
|
+
* @param {Record<string, ?>} data - Column-keyed data.
|
|
3916
|
+
* @returns {void} - No return value.
|
|
3917
|
+
*/
|
|
3918
|
+
_setDefaultTimestampValues(data) {
|
|
3919
|
+
const createdAtColumn = this.getModelClass().getColumns().find((column) => column.getName() == "created_at")
|
|
3920
|
+
const updatedAtColumn = this.getModelClass().getColumns().find((column) => column.getName() == "updated_at")
|
|
3921
|
+
const currentDate = new Date()
|
|
3877
3922
|
|
|
3878
|
-
|
|
3923
|
+
if (createdAtColumn && (data.created_at === undefined || data.created_at === null || data.created_at === "")) {
|
|
3924
|
+
data.created_at = currentDate
|
|
3925
|
+
}
|
|
3926
|
+
if (updatedAtColumn && (data.updated_at === undefined || data.updated_at === null || data.updated_at === "")) {
|
|
3927
|
+
data.updated_at = currentDate
|
|
3879
3928
|
}
|
|
3880
3929
|
}
|
|
3881
3930
|
|
|
@@ -125,7 +125,7 @@ export default class DbGenerateFrontendModels extends BaseCommand {
|
|
|
125
125
|
* @param {Set<string>} args.availableFrontendModelClassNames - Available frontend model class names in backend project.
|
|
126
126
|
* @param {string} args.className - Model class name.
|
|
127
127
|
* @param {Record<string, ?>} args.modelConfig - Model configuration.
|
|
128
|
-
* @param {
|
|
128
|
+
* @param {import("../../../../../configuration-types.js").FrontendModelResourceClassType | null} [args.resourceClass]
|
|
129
129
|
* @returns {void} - No return value.
|
|
130
130
|
*/
|
|
131
131
|
validateModelConfig({availableFrontendModelClassNames, className, modelConfig, resourceClass}) {
|
|
@@ -218,7 +218,7 @@ export default class DbGenerateFrontendModels extends BaseCommand {
|
|
|
218
218
|
* @param {string} args.importPath - Base class import path.
|
|
219
219
|
* @param {typeof import("../../../../../database/record/index.js").default | undefined} args.modelClass - Backend model class.
|
|
220
220
|
* @param {Record<string, ?>} args.modelConfig - Model configuration.
|
|
221
|
-
* @param {
|
|
221
|
+
* @param {import("../../../../../configuration-types.js").FrontendModelResourceClassType | null} [args.resourceClass]
|
|
222
222
|
* @returns {string} - Generated file content.
|
|
223
223
|
*/
|
|
224
224
|
buildModelFileContent({className, importPath, modelClass, modelConfig, resourceClass}) {
|
|
@@ -531,7 +531,7 @@ export default class DbGenerateFrontendModels extends BaseCommand {
|
|
|
531
531
|
*
|
|
532
532
|
* Constructed with no controller/ability so resource overrides must
|
|
533
533
|
* support being called without a request context.
|
|
534
|
-
* @param {
|
|
534
|
+
* @param {import("../../../../../configuration-types.js").FrontendModelResourceClassType | null} resourceClass - Resource class.
|
|
535
535
|
* @returns {string[]} - Relationship names that accept nested writes (empty when none).
|
|
536
536
|
*/
|
|
537
537
|
nestedRelationshipNamesForGenerator(resourceClass) {
|
|
@@ -804,7 +804,7 @@ export default class DbGenerateFrontendModels extends BaseCommand {
|
|
|
804
804
|
* @param {object} args - Arguments.
|
|
805
805
|
* @param {string} args.className - Model class name.
|
|
806
806
|
* @param {Record<string, ?>} args.modelConfig - Model configuration.
|
|
807
|
-
* @param {
|
|
807
|
+
* @param {import("../../../../../configuration-types.js").FrontendModelResourceClassType | null} [args.resourceClass]
|
|
808
808
|
* @returns {Array<{autoload: boolean, relationshipName: string, targetClassName: string, targetFileName: string, type: "belongsTo" | "hasOne" | "hasMany"}>} - Relationships.
|
|
809
809
|
*/
|
|
810
810
|
relationshipsForModel({className, modelConfig, resourceClass}) {
|
|
@@ -826,7 +826,7 @@ export default class DbGenerateFrontendModels extends BaseCommand {
|
|
|
826
826
|
* @param {object} args - Arguments.
|
|
827
827
|
* @param {string} args.className - Model class name.
|
|
828
828
|
* @param {string} args.relationshipName - Relationship name.
|
|
829
|
-
* @param {
|
|
829
|
+
* @param {import("../../../../../configuration-types.js").FrontendModelResourceClassType | null} [args.resourceClass]
|
|
830
830
|
* @returns {{autoload: boolean, relationshipName: string, targetClassName: string, targetFileName: string, type: "belongsTo" | "hasOne" | "hasMany"}} Inferred relationship definition.
|
|
831
831
|
*/
|
|
832
832
|
inferredRelationshipDefinition({className, relationshipName, resourceClass}) {
|
|
@@ -27,6 +27,7 @@ import * as inflection from "inflection"
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Base class for backend frontend-model resources.
|
|
30
|
+
* @template {typeof import("../database/record/index.js").default} [out TModelClass=typeof import("../database/record/index.js").default]
|
|
30
31
|
*/
|
|
31
32
|
export default class FrontendModelBaseResource extends AuthorizationBaseResource {
|
|
32
33
|
/**
|
|
@@ -99,6 +100,8 @@ export default class FrontendModelBaseResource extends AuthorizationBaseResource
|
|
|
99
100
|
* Runs typed controller instance.
|
|
100
101
|
* @returns {import("../controller.js").default & {
|
|
101
102
|
* frontendModelAuthorizedQuery: (action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url") => import("../database/query/model-class-query.js").default<typeof import("../database/record/index.js").default>,
|
|
103
|
+
* frontendModelAbilityAction: (action: string) => string,
|
|
104
|
+
* currentAbility: () => import("../authorization/ability.js").default | undefined,
|
|
102
105
|
* frontendModelIndexQuery: () => import("../database/query/model-class-query.js").default<typeof import("../database/record/index.js").default>,
|
|
103
106
|
* frontendModelPreload: () => import("../database/query/index.js").NestedPreloadRecord | null,
|
|
104
107
|
* serializeFrontendModel: (model: import("../database/record/index.js").default) => Promise<Record<string, unknown>>
|
|
@@ -151,14 +154,14 @@ export default class FrontendModelBaseResource extends AuthorizationBaseResource
|
|
|
151
154
|
|
|
152
155
|
/**
|
|
153
156
|
* Runs model class.
|
|
154
|
-
* @returns {
|
|
157
|
+
* @returns {TModelClass} - Model class.
|
|
155
158
|
*/
|
|
156
159
|
modelClass() {
|
|
157
160
|
if (!this.modelClassValue) {
|
|
158
161
|
throw new Error(`${this.constructor.name} requires a model class.`)
|
|
159
162
|
}
|
|
160
163
|
|
|
161
|
-
return this.modelClassValue
|
|
164
|
+
return /** @type {TModelClass} */ (this.modelClassValue)
|
|
162
165
|
}
|
|
163
166
|
|
|
164
167
|
/**
|
|
@@ -247,6 +250,7 @@ export default class FrontendModelBaseResource extends AuthorizationBaseResource
|
|
|
247
250
|
return /** Narrows the authorized query to the resource's model class. @type {import("../database/query/model-class-query.js").default<MC>} */ (this.typedControllerInstance().frontendModelAuthorizedQuery(action))
|
|
248
251
|
}
|
|
249
252
|
|
|
253
|
+
|
|
250
254
|
/**
|
|
251
255
|
* Runs supports pluck.
|
|
252
256
|
* @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Action.
|
|
@@ -8,7 +8,7 @@ import {validateFrontendModelResourceCommandName} from "./resource-config-valida
|
|
|
8
8
|
/**
|
|
9
9
|
* Runs the frontendModelResourcesForBackendProject helper.
|
|
10
10
|
* @param {import("../configuration-types.js").BackendProjectConfiguration} backendProject - Backend project config.
|
|
11
|
-
* @returns {Record<string,
|
|
11
|
+
* @returns {Record<string, import("../configuration-types.js").FrontendModelResourceClassType>} - Resource definitions keyed by model name.
|
|
12
12
|
*/
|
|
13
13
|
export function frontendModelResourcesForBackendProject(backendProject) {
|
|
14
14
|
const resources = backendProject.frontendModels
|
|
@@ -27,7 +27,7 @@ export function frontendModelResourcesForBackendProject(backendProject) {
|
|
|
27
27
|
/**
|
|
28
28
|
* Runs the frontendModelResourceDefinitionIsClass helper.
|
|
29
29
|
* @param {?} value - Candidate resource definition.
|
|
30
|
-
* @returns {value is
|
|
30
|
+
* @returns {value is import("../configuration-types.js").FrontendModelResourceClassType} - Whether value is a resource class.
|
|
31
31
|
*/
|
|
32
32
|
export function frontendModelResourceDefinitionIsClass(value) {
|
|
33
33
|
return typeof value === "function" && (value === FrontendModelBaseResource || value.prototype instanceof FrontendModelBaseResource)
|
|
@@ -36,7 +36,7 @@ export function frontendModelResourceDefinitionIsClass(value) {
|
|
|
36
36
|
/**
|
|
37
37
|
* Runs the frontendModelResourceClassFromDefinition helper.
|
|
38
38
|
* @param {?} resourceDefinition - Resource definition.
|
|
39
|
-
* @returns {
|
|
39
|
+
* @returns {import("../configuration-types.js").FrontendModelResourceClassType | null} - Resource class when definition is class-based.
|
|
40
40
|
*/
|
|
41
41
|
export function frontendModelResourceClassFromDefinition(resourceDefinition) {
|
|
42
42
|
return frontendModelResourceDefinitionIsClass(resourceDefinition) ? resourceDefinition : null
|
|
@@ -24,7 +24,7 @@ export function frontendModelBroadcastChannelName(modelName) {
|
|
|
24
24
|
* Builds a frontend models map from the configuration's ability resources.
|
|
25
25
|
* Each resource class with a static ModelClass property is keyed by model name.
|
|
26
26
|
* @param {import("../configuration.js").default} configuration - Configuration instance.
|
|
27
|
-
* @returns {Record<string,
|
|
27
|
+
* @returns {Record<string, import("../configuration-types.js").FrontendModelResourceClassType>} - Resource definitions keyed by model name.
|
|
28
28
|
*/
|
|
29
29
|
/**
|
|
30
30
|
* Runs resolve ability resources list.
|
|
@@ -59,12 +59,12 @@ async function resolveAbilityResourcesList(configuration) {
|
|
|
59
59
|
/**
|
|
60
60
|
* Runs frontend model resources from ability resources list.
|
|
61
61
|
* @param {import("../configuration-types.js").AbilityResourceClassType[]} abilityResources - Ability resource classes.
|
|
62
|
-
* @returns {Record<string,
|
|
62
|
+
* @returns {Record<string, import("../configuration-types.js").FrontendModelResourceClassType>} - Resource definitions keyed by model name.
|
|
63
63
|
*/
|
|
64
64
|
function frontendModelResourcesFromAbilityResourcesList(abilityResources) {
|
|
65
65
|
/**
|
|
66
66
|
* Resources.
|
|
67
|
-
@type {Record<string,
|
|
67
|
+
@type {Record<string, import("../configuration-types.js").FrontendModelResourceClassType>} */
|
|
68
68
|
const resources = {}
|
|
69
69
|
|
|
70
70
|
if (!abilityResources || abilityResources.length === 0) return resources
|
|
@@ -81,7 +81,7 @@ function frontendModelResourcesFromAbilityResourcesList(abilityResources) {
|
|
|
81
81
|
if (resourceClass.prototype instanceof FrontendModelBaseResource) {
|
|
82
82
|
const modelClass = /**
|
|
83
83
|
* Narrows the runtime value to the documented type.
|
|
84
|
-
@type {
|
|
84
|
+
@type {import("../configuration-types.js").FrontendModelResourceClassType} */ (resourceClass).ModelClass
|
|
85
85
|
|
|
86
86
|
if (!modelClass) {
|
|
87
87
|
throw new Error(`Resource class ${resourceClass.name} is missing a static ModelClass property`)
|
|
@@ -95,7 +95,7 @@ function frontendModelResourcesFromAbilityResourcesList(abilityResources) {
|
|
|
95
95
|
|
|
96
96
|
resources[modelName] = /**
|
|
97
97
|
* Narrows the runtime value to the documented type.
|
|
98
|
-
@type {
|
|
98
|
+
@type {import("../configuration-types.js").FrontendModelResourceClassType} */ (resourceClass)
|
|
99
99
|
} else if (resourceClass.prototype instanceof AuthorizationBaseResource) {
|
|
100
100
|
// Authorization-only resource — valid but not relevant for WebSocket publishing
|
|
101
101
|
} else {
|
|
@@ -116,7 +116,7 @@ export async function ensureFrontendModelWebsocketPublishersRegistered(configura
|
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
118
|
* All frontend models.
|
|
119
|
-
@type {Record<string,
|
|
119
|
+
@type {Record<string, import("../configuration-types.js").FrontendModelResourceClassType>} */
|
|
120
120
|
let allFrontendModels = {}
|
|
121
121
|
|
|
122
122
|
for (const backendProject of configuration.getBackendProjects()) {
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
* }} NormalizedFrontendModelResourceConfiguration
|
|
255
255
|
*/
|
|
256
256
|
/**
|
|
257
|
-
* @typedef {typeof import("./frontend-model-resource/base-resource.js").default} FrontendModelResourceClassType
|
|
257
|
+
* @typedef {Omit<typeof import("./frontend-model-resource/base-resource.js").default, never> & {new (args: ConstructorParameters<typeof import("./frontend-model-resource/base-resource.js").default>[0]): import("./frontend-model-resource/base-resource.js").default}} FrontendModelResourceClassType
|
|
258
258
|
*/
|
|
259
259
|
/**
|
|
260
260
|
* @typedef {FrontendModelResourceClassType} FrontendModelResourceDefinition
|
|
@@ -993,7 +993,9 @@ export type NormalizedFrontendModelResourceConfiguration = Omit<FrontendModelRes
|
|
|
993
993
|
collectionCommands: Record<string, string>;
|
|
994
994
|
memberCommands: Record<string, string>;
|
|
995
995
|
};
|
|
996
|
-
export type FrontendModelResourceClassType = typeof import("./frontend-model-resource/base-resource.js").default
|
|
996
|
+
export type FrontendModelResourceClassType = Omit<typeof import("./frontend-model-resource/base-resource.js").default, never> & {
|
|
997
|
+
new (args: ConstructorParameters<typeof import("./frontend-model-resource/base-resource.js").default>[0]): import("./frontend-model-resource/base-resource.js").default;
|
|
998
|
+
};
|
|
997
999
|
export type FrontendModelResourceDefinition = FrontendModelResourceClassType;
|
|
998
1000
|
export type FrontendModelResourceAbilitiesConfiguration = {
|
|
999
1001
|
/**
|
|
@@ -1100,7 +1102,7 @@ export type BackendProjectConfiguration = {
|
|
|
1100
1102
|
/**
|
|
1101
1103
|
* - Auto-discovered frontend model definitions keyed by model class name. Set internally by the environment handler — do not set manually.
|
|
1102
1104
|
*/
|
|
1103
|
-
frontendModels?: Record<string,
|
|
1105
|
+
frontendModels?: Record<string, FrontendModelResourceClassType> | undefined;
|
|
1104
1106
|
};
|
|
1105
1107
|
export type RouteResolverHookArgs = {
|
|
1106
1108
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-types.d.ts","sourceRoot":"","sources":["../../src/configuration-types.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;;;;;GAMG;AAEH;;GAEG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;GAeG;AAEH;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;GAEG;AAEH;;;;;;GAMG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;GAEG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AAEH;;;;GAIG;AAEH;;;;;;;;GAQG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;GAGG;AAGH;;GAEG;AAEH;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;GAQG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;GASG;AAEH;;;;;GAKG;AAEH;;;;;;;;;GASG;AAEH;;;;;;;;;;;GAWG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;GAEG;AAEH;;;;GAIG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,yBAAyB;uBAraZ,CAAS,IAAwL,EAAxL;IAAC,OAAO,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