github.com/kiegroup/kie-tools/packages/kn-plugin-workflow@v0.32.0/env/index.js (about)

     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one
     3   * or more contributor license agreements.  See the NOTICE file
     4   * distributed with this work for additional information
     5   * regarding copyright ownership.  The ASF licenses this file
     6   * to you under the Apache License, Version 2.0 (the
     7   * "License"); you may not use this file except in compliance
     8   * with the License.  You may obtain a copy of the License at
     9   *
    10   *  http://www.apache.org/licenses/LICENSE-2.0
    11   *
    12   * Unless required by applicable law or agreed to in writing,
    13   * software distributed under the License is distributed on an
    14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    15   * KIND, either express or implied.  See the License for the
    16   * specific language governing permissions and limitations
    17   * under the License.
    18   */
    19  
    20  const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/build-env");
    21  const packageJson = require("@kie-tools/kn-plugin-workflow/package.json");
    22  
    23  module.exports = composeEnv([require("@kie-tools/root-env/env")], {
    24    vars: varsWithName({
    25      KN_PLUGIN_WORKFLOW__version: {
    26        name: "KN_PLUGIN_WORKFLOW__version",
    27        default: packageJson.version,
    28        description: "Knative SonataFlow plugin version",
    29      },
    30      KN_PLUGIN_WORKFLOW__quarkusPlatformGroupId: {
    31        name: "KN_PLUGIN_WORKFLOW__quarkusPlatformGroupId",
    32        default: "io.quarkus.platform",
    33        description: "Quarkus group to be used when creating the SonataFlow project",
    34      },
    35      KN_PLUGIN_WORKFLOW__quarkusVersion: {
    36        name: "KN_PLUGIN_WORKFLOW__quarkusVersion",
    37        default: "2.16.9.Final",
    38        description: "Quarkus version to be used when creating the SonataFlow project",
    39      },
    40      KN_PLUGIN_WORKFLOW__devModeImage: {
    41        name: "KN_PLUGIN_WORKFLOW__devModeImage",
    42        default: "quay.io/kiegroup/kogito-swf-devmode:1.42",
    43        description: "SonataFlow dev mode image (used on cli run)",
    44      },
    45      KN_PLUGIN_WORKFLOW__kogitoVersion: {
    46        name: "KN_PLUGIN_WORKFLOW__kogitoVersion",
    47        default: "1.42.0.Final",
    48        description: "Kogito version to be used when creating and converting to Quarkus Projects",
    49      },
    50    }),
    51    get env() {
    52      return {
    53        knPluginWorkflow: {
    54          version: getOrDefault(this.vars.KN_PLUGIN_WORKFLOW__version),
    55          quarkusPlatformGroupId: getOrDefault(this.vars.KN_PLUGIN_WORKFLOW__quarkusPlatformGroupId),
    56          quarkusVersion: getOrDefault(this.vars.KN_PLUGIN_WORKFLOW__quarkusVersion),
    57          devModeImage: getOrDefault(this.vars.KN_PLUGIN_WORKFLOW__devModeImage),
    58          kogitoVersion: getOrDefault(this.vars.KN_PLUGIN_WORKFLOW__kogitoVersion),
    59        },
    60      };
    61    },
    62  });