Skip to content

Commit

Permalink
fix!: remove disableScheduledEvents option (#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk authored Sep 29, 2022
1 parent a5bc076 commit a640c37
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 24 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ Default: 'WWW-Authenticate,Server-Authorization'

Used to disable cookie-validation on hapi.js-server.

#### disableScheduledEvents

_This option is deprecated and will be removed in the next major version. If you want to disable the event, please define it in the 'events.schedule.enabled' section of the serverless config._

Disables all scheduled events. Overrides configurations in serverless.yml.

#### dockerHost

The host name of Docker.<br />
Expand Down
14 changes: 2 additions & 12 deletions src/ServerlessOffline.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
defaultOptions,
SERVER_SHUTDOWN_TIMEOUT,
} from './config/index.js'
import { gray, orange } from './config/colors.js'
import { gray } from './config/colors.js'

export default class ServerlessOffline {
#cliOptions = null
Expand Down Expand Up @@ -61,16 +61,6 @@ export default class ServerlessOffline {
async start() {
this.#mergeOptions()

if (this.#options.disableScheduledEvents) {
log.notice()
log.warning(
orange(`'--disableScheduledEvents' is deprecated and will be removed in the next major version.
Please disable the event in the 'events.schedule.enabled' section of the serverless config.
If you are experiencing any issues please let us know: https://github.com/dherault/serverless-offline/issues`),
)
log.notice()
}

const { httpEvents, lambdas, scheduleEvents, webSocketEvents } =
this.#getEvents()

Expand All @@ -84,7 +74,7 @@ If you are experiencing any issues please let us know: https://github.com/dherau
eventModules.push(this.#createHttp(httpEvents))
}

if (!this.#options.disableScheduledEvents && scheduleEvents.length > 0) {
if (scheduleEvents.length > 0) {
eventModules.push(this.#createSchedule(scheduleEvents))
}

Expand Down
5 changes: 0 additions & 5 deletions src/config/commandOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ export default {
type: 'boolean',
usage: 'Used to disable cookie-validation on hapi.js-server.',
},
disableScheduledEvents: {
type: 'boolean',
usage:
'[This option is deprecated] Disables all scheduled events. Overrides configurations in serverless.yml. Default: false.',
},
dockerHost: {
type: 'string',
usage: 'The host name of Docker. Default: localhost.',
Expand Down
1 change: 0 additions & 1 deletion src/config/defaultOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export default {
corsDisallowCredentials: true,
corsExposedHeaders: 'WWW-Authenticate,Server-Authorization',
disableCookieValidation: false,
disableScheduledEvents: false,
dockerHost: 'localhost',
dockerHostServicePath: null,
dockerNetwork: null,
Expand Down

0 comments on commit a640c37

Please sign in to comment.