Skip to content

Commit

Permalink
refactor: rename AB Conversion event to AssetBundleConversionFinished…
Browse files Browse the repository at this point in the history
…Event
  • Loading branch information
aleortega committed Dec 11, 2024
1 parent 33d20b7 commit 06c081d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions report/schemas.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ export namespace AnyMapping {
validate: ValidateFunction<Mapping>;
}

// Warning: (ae-missing-release-tag) "AssetBundleConvertedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-missing-release-tag) "AssetBundleConvertedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-missing-release-tag) "AssetBundleConversionFinishedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-missing-release-tag) "AssetBundleConversionFinishedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AssetBundleConvertedEvent = BaseEvent & {
export type AssetBundleConversionFinishedEvent = BaseEvent & {
type: Events.Type.ASSET_BUNDLE;
subType: Events.SubType.AssetBundle.CONVERTED;
metadata: {
Expand All @@ -150,11 +150,11 @@ export type AssetBundleConvertedEvent = BaseEvent & {
};

// @public (undocumented)
export namespace AssetBundleConvertedEvent {
export namespace AssetBundleConversionFinishedEvent {
const // (undocumented)
schema: JSONSchema<AssetBundleConvertedEvent>;
schema: JSONSchema<AssetBundleConversionFinishedEvent>;
const // (undocumented)
validate: ValidateFunction<AssetBundleConvertedEvent>;
validate: ValidateFunction<AssetBundleConversionFinishedEvent>;
}

// @public
Expand Down
8 changes: 4 additions & 4 deletions src/platform/events/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export namespace BadgeGrantedEvent {
export const validate: ValidateFunction<BadgeGrantedEvent> = generateLazyValidator(schema)
}

export type AssetBundleConvertedEvent = BaseEvent & {
export type AssetBundleConversionFinishedEvent = BaseEvent & {
type: Events.Type.ASSET_BUNDLE
subType: Events.SubType.AssetBundle.CONVERTED
metadata: {
Expand All @@ -51,8 +51,8 @@ export type AssetBundleConvertedEvent = BaseEvent & {
}
}

export namespace AssetBundleConvertedEvent {
export const schema: JSONSchema<AssetBundleConvertedEvent> = {
export namespace AssetBundleConversionFinishedEvent {
export const schema: JSONSchema<AssetBundleConversionFinishedEvent> = {
type: 'object',
properties: {
type: { type: 'string', const: Events.Type.ASSET_BUNDLE },
Expand All @@ -74,5 +74,5 @@ export namespace AssetBundleConvertedEvent {
additionalProperties: true
}

export const validate: ValidateFunction<AssetBundleConvertedEvent> = generateLazyValidator(schema)
export const validate: ValidateFunction<AssetBundleConversionFinishedEvent> = generateLazyValidator(schema)
}
14 changes: 7 additions & 7 deletions test/platform/events/asset-bundle-converted.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import expect from 'expect'
import { AssetBundleConvertedEvent, Events } from '../../../src'
import { AssetBundleConversionFinishedEvent, Events } from '../../../src'

describe('AssetBundleConverted Events tests', () => {
it('AssetBundleConvertedEvent static tests must pass', () => {
const event: AssetBundleConvertedEvent = {
describe('AssetBundleConversionFinished Events tests', () => {
it('AssetBundleConversionFinishedEvent static tests must pass', () => {
const event: AssetBundleConversionFinishedEvent = {
type: Events.Type.ASSET_BUNDLE,
subType: Events.SubType.AssetBundle.CONVERTED,
key: 'key',
Expand All @@ -16,8 +16,8 @@ describe('AssetBundleConverted Events tests', () => {
}
}

expect(AssetBundleConvertedEvent.validate(event)).toEqual(true)
expect(AssetBundleConvertedEvent.validate(null)).toEqual(false)
expect(AssetBundleConvertedEvent.validate({})).toEqual(false)
expect(AssetBundleConversionFinishedEvent.validate(event)).toEqual(true)
expect(AssetBundleConversionFinishedEvent.validate(null)).toEqual(false)
expect(AssetBundleConversionFinishedEvent.validate({})).toEqual(false)
})
})

0 comments on commit 06c081d

Please sign in to comment.