async getHandlerFileAbsolutePath() {
    // Extract the handler file name without the extension.
    const handlerFileName = this.handler.split('.')[0]

    // Construct the absolute path to the handler file without the extension.
    const handlerFileAbsolutePathWithoutExtension = path.resolve(
      this.serviceAbsolutePath,
      handlerFileName,
    )

    // Get a list of possible extensions based on the specified runtime
    // ex. ['.js', '.mjs', '.js', '.ts']
    const possibleExtensions = flatten(
      runtimeWrappers
        .filter((runtimeWrapper) =>
          runtimeWrapper.versions.includes(this.runtime),
        )
        .map((possibleRuntime) => possibleRuntime.extensions),
    )

    // Get a list of possible handler file paths with the different extensions
    // and check to see which one exists
    const possibleHandlerFiles = await Promise.all(
      possibleExtensions.map(async (ext) => {
        return {
          path: `${handlerFileAbsolutePathWithoutExtension}${ext}`,
          exists: await fileExists(
            `${handlerFileAbsolutePathWithoutExtension}${ext}`,
          ),
        }
      }),
    )

    // Find the handler file that actually exists
    const handlerFileAbsolutePath = possibleHandlerFiles.find(
      (file) => file.exists,
    )?.path

    // If none of the possible handler files exist, throw an error
    if (!handlerFileAbsolutePath) {
      throw new ServerlessError(
        `Handler "${this.handler}" not found in service directory`,
        'DEV_MODE_HANDLER_NOT_FOUND',
        { stack: false },
      )
    }

    return handlerFileAbsolutePath
  }
Asynchronously retrieves the absolute path of the handler file, considering possible file extensions.

This method constructs the absolute path of the handler file based on the handler name provided in the class instance,
the service's absolute path, and the runtime environment. It checks for possible file extensions that match the runtime
environment's expected file types and returns the first matching handler file's absolute path.

@async
@returns {Promise<string>} A promise that resolves to the absolute path of the handler file.
If no files are found, an error will be thrown.

@example
const handlerFileAbsolutePath = await localLambda.getHandlerFileAbsolutePath();
console.log(handlerFileAbsolutePath); // Outputs: "/path/to/service/handler.js"