def build_entry_points()

in aws_lambda_builders/workflows/nodejs_npm_esbuild/esbuild.py [0:0]


    def build_entry_points(self) -> "EsbuildCommandBuilder":
        """
        Build the entry points to the command

        :rtype: EsbuildCommandBuilder
        :return: An instance of the command builder
        """
        if self.ENTRY_POINTS not in self._bundler_config:
            raise EsbuildCommandError(f"{self.ENTRY_POINTS} not set ({self._bundler_config})")

        entry_points = self._bundler_config[self.ENTRY_POINTS]

        if not isinstance(entry_points, list):
            raise EsbuildCommandError(f"{self.ENTRY_POINTS} must be a list ({self._bundler_config})")

        if not entry_points:
            raise EsbuildCommandError(f"{self.ENTRY_POINTS} must not be empty ({self._bundler_config})")

        entry_paths = [self._osutils.joinpath(self._scratch_dir, entry_point) for entry_point in entry_points]

        LOG.debug("NODEJS building %s using esbuild to %s", entry_paths, self._artifacts_dir)

        for entry_path, entry_point in zip(entry_paths, entry_points):
            self._command.append(self._get_explicit_file_type(entry_point, entry_path))

        return self