Skip to content

Commit

Permalink
feat(events-service): rename package (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomosterlund committed Apr 19, 2024
1 parent 1323eb2 commit 830bfc1
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions development/calendar/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { createEventRecurrencePlugin } from '@schedule-x/event-recurrence/src'
import { createCalendarControlsPlugin } from '../../packages/calendar-controls/src'
import { CalendarAppSingleton } from '@schedule-x/shared/src'
import { createCurrentTimePlugin } from '../../packages/current-time/src/current-time-plugin.impl.ts'
import { createEventUpdaterPlugin } from '../../packages/event-updater/src'
import { createEventsServicePlugin } from '../../packages/events-service/src'

const calendarElement = document.getElementById('calendar') as HTMLElement

Expand Down Expand Up @@ -63,7 +63,7 @@ class CalendarsUpdaterPlugin {
const calendarsUpdaterPlugin = new CalendarsUpdaterPlugin()

const calendarControlsPlugin = createCalendarControlsPlugin()
const eventUpdaterPlugin = createEventUpdaterPlugin()
const eventUpdaterPlugin = createEventsServicePlugin()
const calendar = createCalendar({
// weekOptions: {
// gridHeight: 3000,
Expand Down
1 change: 0 additions & 1 deletion packages/event-updater/src/index.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![Schedule-X](https://schedule-x.s3.eu-west-1.amazonaws.com/schedule-x-logo.png)

# @schedule-x/event-updater
# @schedule-x/events-service

https://schedule-x.dev
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@schedule-x/event-updater",
"name": "@schedule-x/events-service",
"version": "1.32.0",
"publishConfig": {
"access": "public"
},
"description": "Plugin for updating events in the Schedule-x calendar",
"description": "Plugin for querying and updating events in the Schedule-x calendar",
"author": {
"name": "Tom Österlund",
"email": "tom@oesterlund.de",
Expand All @@ -27,7 +27,7 @@
"repository": {
"type": "git",
"url": "https://github.com/schedule-x/schedule-x",
"directory": "packages/event-updater"
"directory": "packages/events-service"
},
"homepage": "https://schedule-x.dev",
"gitHead": "981dc3c7e4f5d56288dfbb27b992ea73e8206675"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import {
it,
expect,
} from '@schedule-x/shared/src/utils/stateless/testing/unit/unit-testing-library.impl'
import { createEventUpdaterPlugin } from '../event-updater-plugin.impl'
import { createEventsServicePlugin } from '../events-service-plugin.impl'
import { __createAppWithViews__ } from '@schedule-x/calendar/src/utils/stateless/testing/__create-app-with-views__'

describe('Event-updater plugin', () => {
describe('Events-service plugin', () => {
it('should add an event', () => {
const $app = __createAppWithViews__()
const underTest = createEventUpdaterPlugin()
const underTest = createEventsServicePlugin()
underTest.init($app)

const event = {
Expand All @@ -30,7 +30,7 @@ describe('Event-updater plugin', () => {

it('should update an event', () => {
const $app = __createAppWithViews__()
const underTest = createEventUpdaterPlugin()
const underTest = createEventsServicePlugin()
underTest.init($app)
const event = {
id: '1',
Expand All @@ -57,7 +57,7 @@ describe('Event-updater plugin', () => {

it('should get an event', () => {
const $app = __createAppWithViews__()
const underTest = createEventUpdaterPlugin()
const underTest = createEventsServicePlugin()
underTest.init($app)
const event = {
id: '1',
Expand All @@ -77,7 +77,7 @@ describe('Event-updater plugin', () => {

it('should remove an event', () => {
const $app = __createAppWithViews__()
const underTest = createEventUpdaterPlugin()
const underTest = createEventsServicePlugin()
underTest.init($app)
const event = {
id: '1',
Expand All @@ -94,7 +94,7 @@ describe('Event-updater plugin', () => {

it('should get multiple events', () => {
const $app = __createAppWithViews__()
const underTest = createEventUpdaterPlugin()
const underTest = createEventsServicePlugin()
underTest.init($app)
const event1 = {
id: '1',
Expand Down Expand Up @@ -141,7 +141,7 @@ describe('Event-updater plugin', () => {
},
],
})
const underTest = createEventUpdaterPlugin()
const underTest = createEventsServicePlugin()
underTest.init($app)
expect($app.calendarEvents.list.value.length).toBe(2)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import EventsFacade from '@schedule-x/shared/src/utils/stateful/events-facade/ev
import EventsFacadeImpl from '@schedule-x/shared/src/utils/stateful/events-facade/events-facade.impl'
import CalendarEventExternal from '@schedule-x/shared/src/interfaces/calendar/calendar-event.interface'

class EventUpdaterPluginImpl implements PluginBase {
name = 'EventUpdaterPlugin'
class EventsServicePluginImpl implements PluginBase {
name = 'EventsServicePlugin'
$app!: CalendarAppSingleton
eventsFacade!: EventsFacade

Expand Down Expand Up @@ -39,6 +39,6 @@ class EventUpdaterPluginImpl implements PluginBase {
}
}

export const createEventUpdaterPlugin = () => {
return new EventUpdaterPluginImpl()
export const createEventsServicePlugin = () => {
return new EventsServicePluginImpl()
}
1 change: 1 addition & 0 deletions packages/events-service/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { createEventsServicePlugin } from './events-service-plugin.impl'
File renamed without changes.

0 comments on commit 830bfc1

Please sign in to comment.