Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/asset/core/exporter.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @import { TypeRegistry } from '../../reflect/resources/index.js' */
/** @import { Constructor } from '../../type/index.js' */
import { throws } from '../../logger/index.js'

Expand All @@ -22,9 +23,10 @@ export class Exporter {

/**
* @param {T} _asset
* @param {TypeRegistry} _typeRegistry
* @returns {Promise<BodyInit | undefined>}
*/
async serialize(_asset) {
async serialize(_asset, _typeRegistry) {
throws(`Implement the method \`serialize\` on \`${this.constructor.name}\``)

return undefined
Expand Down
4 changes: 3 additions & 1 deletion src/asset/core/parser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @import { TypeRegistry } from '../../reflect/resources/index.js' */
/** @import { Constructor } from '../../type/index.js' */
import { throws } from '../../logger/index.js'

Expand All @@ -22,9 +23,10 @@ export class Parser {

/**
* @param {Response} _response
* @param {TypeRegistry} _typeRegistry
* @returns {Promise<T | undefined>}
*/
async parse(_response) {
async parse(_response, _typeRegistry) {
throws(`Implement the method \`parse\` on \`${this.constructor.name}\``)

return undefined
Expand Down
16 changes: 11 additions & 5 deletions src/asset/plugins/assetServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { App, Plugin } from '../../app/index.js'
import { EventPlugin } from '../../event/index.js'
import { AssetServer } from '../resources/index.js'
import { AssetLoadFail, AssetLoadSuccess, AssetSaveSuccess } from '../events/index.js'
import { updateAssets, updateAssetLoadEvents, updateAssetSaveEvents, logFailedLoads, registerAssetServerTypes } from '../systems/index.js'
import { updateAssets, logFailedLoads, registerAssetServerTypes } from '../systems/index.js'
import { AppSchedule, CoreSystems } from '../../core/index.js'

export class AssetServerPlugin extends Plugin {
Expand All @@ -22,10 +22,16 @@ export class AssetServerPlugin extends Plugin {
.registerPlugin(new EventPlugin({
event: AssetLoadFail
}))
.registerSystem({ schedule: AppSchedule.Startup, systemGroup: CoreSystems.Start, system: registerAssetServerTypes })
.registerSystem({ schedule: AppSchedule.Update, systemGroup: CoreSystems.End, system: updateAssets })
.registerSystem({ schedule: AppSchedule.Update, systemGroup: CoreSystems.End, system: updateAssetLoadEvents })
.registerSystem({ schedule: AppSchedule.Update, systemGroup: CoreSystems.End, system: updateAssetSaveEvents })
.registerSystem({
schedule: AppSchedule.Startup,
systemGroup: CoreSystems.Start,
system: registerAssetServerTypes
})
.registerSystem({
schedule: AppSchedule.Update,
systemGroup: CoreSystems.PostMain,
system: updateAssets
})
.registerSystem({ schedule: AppSchedule.Update, systemGroup: CoreSystems.End, system: logFailedLoads })
}
}
Loading
Loading