diff --git a/README.md b/README.md index 43c09e9a1..8acf3cf59 100644 --- a/README.md +++ b/README.md @@ -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.
diff --git a/src/ServerlessOffline.js b/src/ServerlessOffline.js index 3806ff4a0..ec1c9087a 100644 --- a/src/ServerlessOffline.js +++ b/src/ServerlessOffline.js @@ -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 @@ -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() @@ -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)) } diff --git a/src/config/commandOptions.js b/src/config/commandOptions.js index 4b38d9c34..80ba2528f 100644 --- a/src/config/commandOptions.js +++ b/src/config/commandOptions.js @@ -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.', diff --git a/src/config/defaultOptions.js b/src/config/defaultOptions.js index c30507454..3de77e8b0 100644 --- a/src/config/defaultOptions.js +++ b/src/config/defaultOptions.js @@ -5,7 +5,6 @@ export default { corsDisallowCredentials: true, corsExposedHeaders: 'WWW-Authenticate,Server-Authorization', disableCookieValidation: false, - disableScheduledEvents: false, dockerHost: 'localhost', dockerHostServicePath: null, dockerNetwork: null,