public Publisher diffApp()

in grails-forge-api/src/main/java/org/grails/forge/api/diff/DiffController.java [147:181]


    public Publisher<String> diffApp(
            ApplicationType type,
            @Pattern(regexp = "[\\w\\d-_\\.]+") String name,
            @Nullable List<String> features,
            @Nullable BuildTool build,
            @Nullable TestFramework test,
            @Nullable GormImpl gorm,
            @Nullable ServletImpl servlet,
            @Nullable JdkVersion javaVersion,
            @Parameter(hidden = true) RequestInfo requestInfo) throws IOException {
        ProjectGenerator projectGenerator;
        GeneratorContext generatorContext;
        try {
            Project project = name != null ? NameUtils.parse(name) : this.project;
            Options options = new Options(
                    test != null ? test : TestFramework.DEFAULT_OPTION,
                    gorm != null ? gorm : GormImpl.DEFAULT_OPTION,
                    servlet != null ? servlet : ServletImpl.DEFAULT_OPTION,
                    javaVersion != null ? javaVersion : JdkVersion.DEFAULT_OPTION
            );
            projectGenerator = this.projectGenerator;
            generatorContext = projectGenerator.createGeneratorContext(
                    type,
                    project,
                    options,
                    UserAgentParser.getOperatingSystem(requestInfo.getUserAgent()),
                    features != null ? features : Collections.emptyList(),
                    ConsoleOutput.NOOP
            );
        } catch (IllegalArgumentException e) {
            throw new HttpStatusException(HttpStatus.BAD_REQUEST, e.getMessage());
        }

        return diffFlowable(projectGenerator, generatorContext);
    }