diff --git a/.circleci/validation/utilities.go b/.circleci/validation/utilities.go index 524aed2b..cc532420 100644 --- a/.circleci/validation/utilities.go +++ b/.circleci/validation/utilities.go @@ -14,7 +14,7 @@ func getFullContentFromFormula(root string) map[string]string { panic(err) } for _, file := range files { - if strings.Contains(file, "src/main.") && !strings.HasPrefix(file, "../../templates") { + if strings.Contains(file, "src/main.") && !strings.HasPrefix(file, "../../templates") && !strings.Contains(file, "_vendor/") { fileX := strings.Split(file, "/src/main.") required[fileX[0]] = fileX[1] } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be32e3a3..cd99eb53 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ #https://pre-commit.com/hooks.html -exclude: '^_vendor/.*$' +exclude: '_vendor/.*$' repos: - repo: git://github.com/pre-commit/pre-commit-hooks rev: v2.5.0 diff --git a/beagle/generate/help.json b/beagle/generate/help.json new file mode 100755 index 00000000..f2648ad2 --- /dev/null +++ b/beagle/generate/help.json @@ -0,0 +1,4 @@ +{ + "long": "Generate beagle objects", + "short": "Generate beagle objects" +} diff --git a/beagle/generate/help.txt b/beagle/generate/help.txt new file mode 100644 index 00000000..d719e2af --- /dev/null +++ b/beagle/generate/help.txt @@ -0,0 +1 @@ +Generate beagle objects diff --git a/beagle/generate/scaffold/Dockerfile b/beagle/generate/scaffold/Dockerfile new file mode 100755 index 00000000..f3f2f399 --- /dev/null +++ b/beagle/generate/scaffold/Dockerfile @@ -0,0 +1,18 @@ +FROM cimg/base:stable-20.04 + +USER root + +COPY . / + +RUN sed -i 's/\r//g' /set_umask.sh +RUN sed -i 's/\r//g' /run.sh +RUN chmod +x /set_umask.sh +RUN mkdir /app + +ENV DOCKER_EXECUTION=true +ENV CURRENT_PWD=/app + +WORKDIR / + +ENTRYPOINT ["/set_umask.sh"] +CMD ["/run.sh"] diff --git a/beagle/generate/scaffold/Makefile b/beagle/generate/scaffold/Makefile new file mode 100755 index 00000000..1d689da0 --- /dev/null +++ b/beagle/generate/scaffold/Makefile @@ -0,0 +1,14 @@ +# SH +BINARY_NAME=run.sh +BIN_FOLDER=bin + +build: bash-build docker + +bash-build: + mkdir -p $(BIN_FOLDER) + cp -r src/* $(BIN_FOLDER) + mv $(BIN_FOLDER)/main.sh $(BIN_FOLDER)/$(BINARY_NAME) + chmod +x $(BIN_FOLDER)/$(BINARY_NAME) + +docker: + cp Dockerfile set_umask.sh $(BIN_FOLDER) diff --git a/beagle/generate/scaffold/README.md b/beagle/generate/scaffold/README.md new file mode 100755 index 00000000..27b53c27 --- /dev/null +++ b/beagle/generate/scaffold/README.md @@ -0,0 +1,16 @@ + +# Ritchie Formula + +## command + +```bash +rit beagle generate scaffold +``` + +## description + +This formula generates a backend project with beagle and also, if needed, generates a web and/or mobile project with beagle. + +## How it works + +![gif](doc/beagle-generate-scaffold.gif) diff --git a/beagle/generate/scaffold/config.json b/beagle/generate/scaffold/config.json new file mode 100755 index 00000000..75964d48 --- /dev/null +++ b/beagle/generate/scaffold/config.json @@ -0,0 +1,4 @@ +{ + "dockerImageBuilder": "cimg/base:stable-20.04", + "inputs": [] +} diff --git a/beagle/generate/scaffold/doc/beagle-generate-scaffold.gif b/beagle/generate/scaffold/doc/beagle-generate-scaffold.gif new file mode 100644 index 00000000..27bdd80f Binary files /dev/null and b/beagle/generate/scaffold/doc/beagle-generate-scaffold.gif differ diff --git a/beagle/generate/scaffold/help.json b/beagle/generate/scaffold/help.json new file mode 100755 index 00000000..602f2e68 --- /dev/null +++ b/beagle/generate/scaffold/help.json @@ -0,0 +1,4 @@ +{ + "long": "Generates a backend project with beagle and also, if needed, generates a web and/or mobile project with beagle", + "short": "Manipulate scaffold" +} diff --git a/beagle/generate/scaffold/help.txt b/beagle/generate/scaffold/help.txt new file mode 100644 index 00000000..9854e081 --- /dev/null +++ b/beagle/generate/scaffold/help.txt @@ -0,0 +1 @@ +Manipulate scaffold diff --git a/beagle/generate/scaffold/metadata.json b/beagle/generate/scaffold/metadata.json new file mode 100755 index 00000000..59ffb758 --- /dev/null +++ b/beagle/generate/scaffold/metadata.json @@ -0,0 +1,18 @@ +{ + "execution": [ + "local", + "docker" + ], + "os": { + "deps": [], + "support": [ + "mac", + "linux" + ] + }, + "tags": [ + "beagle", + "generate", + "scaffold" + ] +} diff --git a/beagle/generate/scaffold/set_umask.sh b/beagle/generate/scaffold/set_umask.sh new file mode 100755 index 00000000..091c13d6 --- /dev/null +++ b/beagle/generate/scaffold/set_umask.sh @@ -0,0 +1,3 @@ +#!/bin/sh +umask 0011 +$1 diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.gitignore b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.gitignore new file mode 100644 index 00000000..2eef2510 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.gitignore @@ -0,0 +1,13 @@ +Thumbs.db +.DS_Store +.gradle +build/ +target/ +out/ +.idea +*.iml +*.ipr +*.iws +.project +.settings +.classpath diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.mvn/wrapper/MavenWrapperDownloader.java b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..d475a89c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,110 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.0/maven-wrapper-0.4.0.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.mvn/wrapper/maven-wrapper.jar b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..08ebbb67 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.mvn/wrapper/maven-wrapper.jar differ diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.mvn/wrapper/maven-wrapper.properties b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..0773086c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/Dockerfile b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/Dockerfile new file mode 100644 index 00000000..3d5dcaca --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:14-alpine +COPY target/bff-micronaut-*.jar bff-micronaut.jar +EXPOSE 8080 +CMD ["java", "-Dcom.sun.management.jmxremote", "-Xmx128m", "-jar", "bff-micronaut.jar"] diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/README.md b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/README.md new file mode 100644 index 00000000..d6de9c0c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/README.md @@ -0,0 +1,3 @@ +## Feature http-client documentation + +- [Micronaut Micronaut HTTP Client documentation](https://docs.micronaut.io/latest/guide/index.html#httpClient) diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/micronaut-cli.yml b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/micronaut-cli.yml new file mode 100644 index 00000000..bafc36cf --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/micronaut-cli.yml @@ -0,0 +1,22 @@ +applicationType: default +defaultPackage: ${package_name} +testFramework: junit +sourceLanguage: kotlin +buildTool: maven +features: + [ + annotation-api, + app-name, + docker, + file-watch, + http-client, + junit, + kotlin, + kotlin-application, + logback, + maven, + netty-server, + readme, + shade, + yaml, + ] diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/mvnw b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/mvnw new file mode 100644 index 00000000..961a8250 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.0/maven-wrapper-0.4.0.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/mvnw.bat b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/mvnw.bat new file mode 100644 index 00000000..adaa3c2a --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/mvnw.bat @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.0/maven-wrapper-0.4.0.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/pom.xml b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/pom.xml new file mode 100644 index 00000000..b0335f42 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/pom.xml @@ -0,0 +1,286 @@ + + + 4.0.0 + ${package_name} + ${artifact_name} + 0.1 + + + io.micronaut + micronaut-parent + + 2.0.0 + + + + ${jdk} + ${jdk.version} + ${jdk.version} + UTF-8 + UTF-8 + 2.0.0 + ${package_name}.ApplicationKt + ${kotlin_version} + 2.22.2 + 2.22.2 + + + + + jcenter.bintray.com + https://jcenter.bintray.com + + + bintray-zupit-repo + https://dl.bintray.com/zupit/repo + + + + + + br.com.zup.beagle + beagle-micronaut-starter + ${beagle_version} + + + io.micronaut + micronaut-inject + compile + + + io.micronaut + micronaut-validation + compile + + + io.micronaut + micronaut-http-server-netty + compile + + + io.micronaut + micronaut-http-client + compile + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${kotlinVersion} + + + org.jetbrains.kotlin + kotlin-reflect + ${kotlinVersion} + compile + + + io.micronaut.kotlin + micronaut-kotlin-runtime + compile + + + io.micronaut + micronaut-runtime + compile + + + javax.annotation + javax.annotation-api + compile + + + ch.qos.logback + logback-classic + runtime + + + com.fasterxml.jackson.module + jackson-module-kotlin + runtime + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + io.micronaut.test + micronaut-test-junit5 + test + + + + + + + io.micronaut.build + micronaut-maven-plugin + + + org.apache.maven.plugins + maven-shade-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + true + + %regex[.*] + + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${maven-failsafe-plugin.version} + + + + integration-test + verify + + + + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${kotlinVersion} + + ${jdk.version} + + all-open + + + + + + + + kapt + + kapt + + + + ${project.basedir}/src/main/kotlin + + + + io.micronaut + micronaut-inject-java + ${micronaut.version} + + + io.micronaut + micronaut-validation + ${micronaut.version} + + + + micronaut.processing.group=com.bff.micronaut + micronaut.processing.module=bffMicronaut + + + + + compile + + compile + + + + ${project.basedir}/src/main/kotlin + + + + + test-kapt + + test-kapt + + + + ${project.basedir}/src/test/kotlin + + + + io.micronaut + micronaut-inject-java + ${micronaut.version} + + + io.micronaut + micronaut-validation + ${micronaut.version} + + + + + + test-compile + + test-compile + + + + ${project.basedir}/src/test/kotlin + ${project.basedir}/target/generated-sources/kapt/test + + + + + + + org.jetbrains.kotlin + kotlin-maven-allopen + ${kotlinVersion} + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + none + ${jdk.version} + ${jdk.version} + + + + default-compile + none + + + default-testCompile + none + + + java-compile + compile + + compile + + + + java-test-compile + test-compile + + testCompile + + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/kotlin/com/bff/micronaut/Application.kt b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/kotlin/com/bff/micronaut/Application.kt new file mode 100644 index 00000000..cd449bd4 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/kotlin/com/bff/micronaut/Application.kt @@ -0,0 +1,10 @@ +package ${package_name} + +import io.micronaut.runtime.Micronaut.* + +fun main(args: Array) { + build() + .args(*args) + .packages("${package_name}") + .start() +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/kotlin/com/bff/micronaut/MyController.kt b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/kotlin/com/bff/micronaut/MyController.kt new file mode 100644 index 00000000..d9e1f574 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/kotlin/com/bff/micronaut/MyController.kt @@ -0,0 +1,19 @@ +package ${package_name} + +import io.micronaut.http.annotation.Controller +import io.micronaut.http.annotation.Get + +@Controller +class MyController(private val myService: MyService) { + @Get("/action") + fun getAction() = myService.createAction() + + @Get("/screen") + fun getScreen() = myService.createScreen() + + @Get("/builder") + fun getScreenBuilder() = myService.createScreenBuilder() + + @Get("/widget") + fun getWidget() = myService.createWidget() +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/kotlin/com/bff/micronaut/MyService.kt b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/kotlin/com/bff/micronaut/MyService.kt new file mode 100644 index 00000000..1a19bcff --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/kotlin/com/bff/micronaut/MyService.kt @@ -0,0 +1,38 @@ +package ${package_name} + +import br.com.zup.beagle.core.ServerDrivenComponent +import br.com.zup.beagle.widget.Widget +import br.com.zup.beagle.widget.action.Action +import br.com.zup.beagle.widget.action.Alert +import br.com.zup.beagle.widget.core.TextAlignment +import br.com.zup.beagle.widget.layout.Screen +import br.com.zup.beagle.widget.layout.ScreenBuilder +import br.com.zup.beagle.widget.ui.Text +import javax.inject.Singleton + +@Singleton +class MyService { + fun createAction(): Action = Alert( + title = "My Dialog", + message = "This is a native popup!", + labelOk= "Close" + ) + + fun createScreen(): Screen = + Screen(child = this.createWidget()) + + fun createScreenBuilder(): ScreenBuilder = + MyScreenBuilder(this.createWidget()) + + fun createWidget(): Widget = Text( + text = "Hello, world!", + alignment = TextAlignment.CENTER, + textColor = "#505050" + ) +} + +private class MyScreenBuilder( + private val component: ServerDrivenComponent +) : ScreenBuilder { + override fun build() = Screen(child = this.component) +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/resources/application.properties b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/resources/application.properties new file mode 100644 index 00000000..25954509 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/resources/application.properties @@ -0,0 +1,3 @@ +micronaut.server.cors.enabled=true +jackson.serializationInclusion=NON_NULL +jackson.serialization.indentOutput=true diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/resources/logback.xml b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/resources/logback.xml new file mode 100644 index 00000000..82218708 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/main/resources/logback.xml @@ -0,0 +1,15 @@ + + + + false + + + %cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - %msg%n + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/test/kotlin/com/bff/micronaut/BffMicronautTest.kt b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/test/kotlin/com/bff/micronaut/BffMicronautTest.kt new file mode 100644 index 00000000..05c24514 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-micronaut/src/test/kotlin/com/bff/micronaut/BffMicronautTest.kt @@ -0,0 +1,19 @@ +package ${package_name} +import io.micronaut.runtime.EmbeddedApplication +import io.micronaut.test.annotation.MicronautTest +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import javax.inject.Inject + +@MicronautTest +class BffMicronautTest { + + @Inject + lateinit var application: EmbeddedApplication<*> + + @Test + fun testItWorks() { + Assertions.assertTrue(application.isRunning) + } + +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.gitignore b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.gitignore new file mode 100644 index 00000000..549e00a2 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.mvn/wrapper/MavenWrapperDownloader.java b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..e76d1f32 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.mvn/wrapper/maven-wrapper.jar b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.mvn/wrapper/maven-wrapper.jar differ diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.mvn/wrapper/maven-wrapper.properties b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/mvnw b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/mvnw new file mode 100644 index 00000000..a16b5431 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/mvnw.cmd b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/mvnw.cmd new file mode 100644 index 00000000..c8d43372 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/mvnw.cmd @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/pom.xml b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/pom.xml new file mode 100644 index 00000000..b0115534 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/pom.xml @@ -0,0 +1,99 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.2.8.RELEASE + + + ${package_name} + ${artifact_name} + 0.0.1-SNAPSHOT + Bff Beagle Spring + Beagle BFF using Spring Boot to Web + + + ${jdk} + ${kotlin_version} + + + + + bintray-zupit-repo + https://dl.bintray.com/zupit/repo + + + + + + br.com.zup.beagle + beagle-spring-starter + ${beagle_version} + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-web + + + com.fasterxml.jackson.module + jackson-module-kotlin + + + org.jetbrains.kotlin + kotlin-reflect + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + ${project.basedir}/src/main/kotlin + ${project.basedir}/src/test/kotlin + + + org.springframework.boot + spring-boot-maven-plugin + + + org.jetbrains.kotlin + kotlin-maven-plugin + + + -Xjsr305=strict + + + spring + + + + + org.jetbrains.kotlin + kotlin-maven-allopen + ${kotlin.version} + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/BffBeagleSpringApplication.kt b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/BffBeagleSpringApplication.kt new file mode 100644 index 00000000..742308c5 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/BffBeagleSpringApplication.kt @@ -0,0 +1,11 @@ +package ${package_name} + +import org.springframework.boot.autoconfigure.SpringBootApplication +import org.springframework.boot.runApplication + +@SpringBootApplication +class BffBeagleSpringApplication + +fun main(args: Array) { + runApplication(*args) +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/config/CorsConfig.kt b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/config/CorsConfig.kt new file mode 100644 index 00000000..90e129fa --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/config/CorsConfig.kt @@ -0,0 +1,13 @@ +package ${package_name}.config + +import org.springframework.context.annotation.Configuration +import org.springframework.web.servlet.config.annotation.CorsRegistry +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer + +@Configuration +open class CorsConfig : WebMvcConfigurer { + + override fun addCorsMappings(registry: CorsRegistry) { + registry.addMapping("/**") + } +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/controller/MyController.kt b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/controller/MyController.kt new file mode 100644 index 00000000..4e5ce6bc --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/controller/MyController.kt @@ -0,0 +1,20 @@ +package ${package_name}.controller + +import ${package_name}.service.MyService +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +class MyController(private val myService: MyService) { + @GetMapping("/action") + fun getAction() = myService.createAction() + + @GetMapping("/screen") + fun getScreen() = myService.createScreen() + + @GetMapping("/builder") + fun getScreenBuilder() = myService.createScreenBuilder() + + @GetMapping("/widget") + fun getWidget() = myService.createWidget() +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/service/MyService.kt b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/service/MyService.kt new file mode 100644 index 00000000..08a447d0 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/kotlin/com/base/bff/beagle/project/demo/service/MyService.kt @@ -0,0 +1,38 @@ +package ${package_name}.service + +import br.com.zup.beagle.core.ServerDrivenComponent +import br.com.zup.beagle.widget.Widget +import br.com.zup.beagle.widget.action.Action +import br.com.zup.beagle.widget.action.Alert +import br.com.zup.beagle.widget.core.TextAlignment +import br.com.zup.beagle.widget.layout.Screen +import br.com.zup.beagle.widget.layout.ScreenBuilder +import br.com.zup.beagle.widget.ui.Text +import org.springframework.stereotype.Service + +@Service +class MyService { + fun createAction(): Action = Alert( + title = "My Dialog", + message = "This is a native popup!", + labelOk= "Close" + ) + + fun createScreen(): Screen = + Screen(child = this.createWidget()) + + fun createScreenBuilder(): ScreenBuilder = + MyScreenBuilder(this.createWidget()) + + fun createWidget(): Widget = Text( + text = "Hello, world!", + alignment = TextAlignment.CENTER, + textColor = "#505050" + ) +} + +private class MyScreenBuilder( + private val component: ServerDrivenComponent +) : ScreenBuilder { + override fun build() = Screen(child = this.component) +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/resources/application.properties b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/resources/application.properties new file mode 100644 index 00000000..3ca94620 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/main/resources/application.properties @@ -0,0 +1,3 @@ +beagle.cache.endpoint.exclude=/action +jackson.serializationInclusion=NON_NULL +jackson.serialization.indentOutput=true diff --git a/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/test/kotlin/com/base/bff/beagle/project/demo/BffBeagleSpringApplicationTests.kt b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/test/kotlin/com/base/bff/beagle/project/demo/BffBeagleSpringApplicationTests.kt new file mode 100644 index 00000000..de8fdeab --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/_vendor/beagle-spring/src/test/kotlin/com/base/bff/beagle/project/demo/BffBeagleSpringApplicationTests.kt @@ -0,0 +1,13 @@ +package ${package_name} + +import org.junit.jupiter.api.Test +import org.springframework.boot.test.context.SpringBootTest + +@SpringBootTest +class BffBeagleSpringApplicationTests { + + @Test + fun contextLoads() { + } + +} diff --git a/beagle/generate/scaffold/src/formula/backend-generator/backend.sh b/beagle/generate/scaffold/src/formula/backend-generator/backend.sh new file mode 100644 index 00000000..33d11b51 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/backend-generator/backend.sh @@ -0,0 +1,124 @@ +#!/bin/bash + +formatPackageName() { + echo "$1" | tr "." "/" +} + +createSpringPackage() { + if [[ ! $1 == "com/base/bff/beagle/project/demo" ]]; then + mkdir -p src/main/kotlin/"$1" + cp -r src/main/kotlin/com/base/bff/beagle/project/demo/* src/main/kotlin/"$1" + rm -rf src/main/kotlin/com/base/bff/beagle/project/demo + + mkdir -p src/test/kotlin/"$1" + cp -r src/test/kotlin/com/base/bff/beagle/project/demo/* src/test/kotlin/"$1" + rm -rf src/test/kotlin/com/base/bff/beagle/project/demo + + find src/ -empty -type d -delete + fi +} + +createMicronautPackage() { + if [[ ! $1 == "com/bff/micronaut" ]]; then + mkdir -p src/main/kotlin/"$1" + cp -r src/main/kotlin/com/bff/micronaut/* src/main/kotlin/"$1" + rm -rf src/main/kotlin/com/bff/micronaut + + mkdir -p src/test/kotlin/"$1" + cp -r src/test/kotlin/com/bff/micronaut/* src/test/kotlin/"$1" + rm -rf src/test/kotlin/com/bff/micronaut + + find src/ -empty -type d -delete + fi +} + +replacePackageName() { + local package_name=$1 + shift + + local arr=("$@") + for file in "${arr[@]}" + do + sed -i -e "s/\${package_name}/$package_name/" "$file" + done +} + +removeCors() { + local framework=$1 + local package_name=$2 + local slug=$3 + local formatted_package_name + + formatted_package_name=$(formatPackageName "$package_name") + + cd "$CURRENT_PWD"/"$slug" || exit + + if [[ $1 == "spring" ]]; then + rm -rf src/main/kotlin/"$formatted_package_name"/config + else + sed -i -e "1d" src/main/resources/application.properties + fi +} + +runBackend() { + slug=$1 + package_name=$2 + jdk_version=$3 + kotlin_version=$4 + beagle_version=$5 + framework=$6 + + mkdir "$CURRENT_PWD"/"$slug" + + if [[ $framework == "spring" ]]; then + cp -r formula/backend-generator/_vendor/beagle-spring/. "$CURRENT_PWD"/"$slug" + + cd "$CURRENT_PWD"/"$slug" || exit + + sed -i -e "s/\${artifact_name}/$slug/" pom.xml + sed -i -e "s/\${jdk}/$jdk_version/" pom.xml + sed -i -e "s/\${kotlin_version}/$kotlin_version/" pom.xml + sed -i -e "s/\${beagle_version}/$beagle_version/" pom.xml + + formatted_package_name=$(formatPackageName "$package_name") + createSpringPackage "$formatted_package_name" + + files=( + pom.xml + src/main/kotlin/"$formatted_package_name"/config/CorsConfig.kt + src/main/kotlin/"$formatted_package_name"/controller/MyController.kt + src/main/kotlin/"$formatted_package_name"/service/MyService.kt + src/main/kotlin/"$formatted_package_name"/BffBeagleSpringApplication.kt + src/test/kotlin/"$formatted_package_name"/BffBeagleSpringApplicationTests.kt + ) + + replacePackageName "$package_name" "${files[@]}" + else + cp -r formula/backend-generator/_vendor/beagle-micronaut/. "$CURRENT_PWD"/"$slug" + + cd "$CURRENT_PWD"/"$slug" || exit + + sed -i -e "s/\${artifact_name}/$slug/" pom.xml + sed -i -e "s/\${jdk}/$jdk_version/" pom.xml + sed -i -e "s/\${kotlin_version}/$kotlin_version/" pom.xml + sed -i -e "s/\${beagle_version}/$beagle_version/" pom.xml + + formatted_package_name=$(formatPackageName "$package_name") + createMicronautPackage "$formatted_package_name" + + files=( + micronaut-cli.yml + pom.xml + src/main/kotlin/"$formatted_package_name"/Application.kt + src/main/kotlin/"$formatted_package_name"/MyController.kt + src/main/kotlin/"$formatted_package_name"/MyService.kt + src/test/kotlin/"$formatted_package_name"/BffMicronautTest.kt + ) + + replacePackageName "$package_name" "${files[@]}" + fi + + if [[ $DOCKER_EXECUTION ]]; then + chown 1000:1000 -R "$CURRENT_PWD"/"$slug" + fi +} diff --git a/beagle/generate/scaffold/src/formula/formula.sh b/beagle/generate/scaffold/src/formula/formula.sh new file mode 100755 index 00000000..bfed47cf --- /dev/null +++ b/beagle/generate/scaffold/src/formula/formula.sh @@ -0,0 +1,228 @@ +#!/bin/bash + +# shellcheck source=/dev/null +. "$(dirname "$0")"/formula/backend-generator/backend.sh --source-only +# shellcheck source=/dev/null +. "$(dirname "$0")"/formula/web-generator/web.sh --source-only +# shellcheck source=/dev/null +. "$(dirname "$0")"/formula/mobile-generator/mobile.sh --source-only + +removeSpaces() { + echo "${1}" | xargs | tr " " - +} + +createSlug() { + local tmp="$1" + + if [[ "$1" = *" "* ]]; then + tmp=$(removeSpaces "$1") + fi + + echo "$tmp" | tr '[:upper:]' '[:lower:]' +} + +binaryRead() { + local var + + while true; do + read -rp "$1" var + if [[ "$var" == "y" || "$var" == "Y" || "$var" == "n" || "$var" == "N" ]]; then + echo "$var" | tr '[:upper:]' '[:lower:]' + break + else + echo >&2 "Please, enter with 'y' or 'n'" + fi + done +} + +simpleRead() { + local var + + while true; do + read -rp "$1" var + if [[ -z "$var" ]]; then + echo >&2 "Please, input must not be empty" + else + echo "$var" + break + fi + done +} + +readWithDefaultValue() { + local var + + while true; do + read -rp "$1" var + if [[ -z "$var" ]]; then + echo >&2 "$2" + echo "$2" + break + else + echo "$var" + break + fi + done +} + +readProjectName() { + local project_name + local slug + + while true; do + read -rp "$1" project_name + slug=$(createSlug "$project_name") + if [[ ! "$slug" =~ ^[a-zA-Z0-9-]+$ ]]; then + echo >&2 "Project name cannot contain special characters" + else + reply=("$project_name" "$slug") + break + fi + done +} + +readTwoOptions() { + local var + + while true; do + read -rp "Choose [$1/$2]: " var + if [[ $var == "$1" || $var == "$2" ]]; then + echo "$var" + break + else + echo >&2 "Please, enter with '$1' or '$2'" + fi + done +} + +createBackendProject() { + local project_name + local jdk_version + local kotlin_version + local beagle_version + + readProjectName "Backend project name: " + backend_slug=${reply[1]} + backend_package_name=$(simpleRead "Package name (ex: com.example): ") + jdk_version=$(readWithDefaultValue "JDK version(8+) (default: 13): " "13") + kotlin_version=$(readWithDefaultValue "Kotlin version(1.3+) (default: 1.3.72): " "1.3.72") + beagle_version=$(readWithDefaultValue "Beagle version (default: 1.0.2): " "1.0.2") + backend_framework=$(readTwoOptions "spring" "micronaut") + + # shellcheck disable=SC2091 + $(runBackend "$backend_slug" "$backend_package_name" "$jdk_version" "$kotlin_version" "$beagle_version" "$backend_framework") +} + +createWebProject() { + local project_name + local beagle_version + local framework + + readProjectName "Web project name: " + web_slug=${reply[1]} + beagle_version=$(readWithDefaultValue "Beagle version (default: 1.1.0): " "1.1.0") + framework=$(readTwoOptions "react" "angular") + + # shellcheck disable=SC2091 + $(runWeb "$web_slug" "$beagle_version" "$framework") +} + +createMobileProject() { + local project_name + local os + + readProjectName "Mobile project name: " + project_name=${reply[0]} + mobile_slug=${reply[1]} + os=$(readTwoOptions "ios" "android") + + if [[ $os == "ios" ]]; then + local organization_name + local organization_id + local beagle_version + local bff_url + local sourcery + + organization_name=$(simpleRead "Organization name: ") + organization_id=$(simpleRead "Organizaion ID: ") + beagle_version=$(readWithDefaultValue "Beagle version (ex: 1.0.0-IOS, default: latest): " "latest") + bff_url=$(readWithDefaultValue "BFF url (default: http://localhost:8080): " "http://localhost:8080") + sourcery=$(binaryRead "Do you want to use Sourcery? [y/n]: ") + + # shellcheck disable=SC2091 + $(runMobile "$os" "$project_name" "$mobile_slug" "$organization_name" "$organization_id" "$beagle_version" "$bff_url" "$sourcery") + else + local package_name + local min_sdk + local target_sdk + local kotlin_version + local beagle_version + local bff_url + + package_name=$(simpleRead "Package name (ex: com.example): ") + min_sdk=$(readWithDefaultValue "Min version SDK android: (default: 21): " "21") + target_sdk=$(readWithDefaultValue "Target version SDK: (default: 29): " "21") + kotlin_version=$(readWithDefaultValue "Kotlin version(1.3+) (default: 1.3.72): " "1.3.72") + beagle_version=$(readWithDefaultValue "Beagle version (default: 1.0.0): " "1.0.0") + bff_url=$(readWithDefaultValue "BFF url (default: http://localhost:8080): " "http://localhost:8080") + + # shellcheck disable=SC2091 + $(runMobile "$os" "$project_name" "$mobile_slug" "$package_name" "$min_sdk" "$target_sdk" "$kotlin_version" "$beagle_version" "$bff_url") + fi +} + +removeCorsFromBackend() { + # shellcheck disable=SC2091 + $(removeCors "$backend_framework" "$backend_package_name" "$backend_slug") +} + +printResult() { + if [[ $backend_slug ]]; then + echo "Backend project successfully created!!" + echo "📁 ./$backend_slug" + echo + fi + + if [[ $web_slug ]]; then + echo "Web project successfully created!!" + echo "📁 ./$web_slug" + echo + fi + + if [[ $mobile_slug ]]; then + echo "mobile project successfully created!!" + echo "📁 ./$mobile_slug" + echo + fi +} + +runFormula() { + local answer + + createBackendProject + + echo + + answer=$(binaryRead "Do you want to create a web project? [y/n]: ") + if [[ $answer == "y" ]]; then + createWebProject + + echo + + answer=$(binaryRead "Do you want to create a mobile project? [y/n]: ") + if [[ $answer == "y" ]]; then + createMobileProject + fi + else + answer=$(binaryRead "Do you want to create a mobile project? [y/n]: ") + if [[ $answer == "y" ]]; then + createMobileProject + fi + + removeCorsFromBackend + fi + + echo + + printResult +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/.gitignore b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/.gitignore new file mode 100644 index 00000000..603b1407 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/.gitignore @@ -0,0 +1,14 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/.gitignore b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/.gitignore new file mode 100644 index 00000000..796b96d1 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/build.gradle b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/build.gradle new file mode 100644 index 00000000..2b034278 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/build.gradle @@ -0,0 +1,42 @@ +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-kapt' + +android { + compileSdkVersion ${target_sdk} + buildToolsVersion "29.0.3" + + defaultConfig { + applicationId "${package_name}" + minSdkVersion ${min_sdk} + targetSdkVersion ${target_sdk} + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } +} + +ext.beagle_version = "${beagle_version}" + +dependencies { + implementation fileTree(dir: "libs", include: ["*.jar"]) + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation 'androidx.core:core-ktx:1.3.0' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + implementation "br.com.zup.beagle:android:$beagle_version" + kapt "br.com.zup.beagle:android-processor:$beagle_version" + +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/proguard-rules.pro b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/proguard-rules.pro new file mode 100644 index 00000000..f1b42451 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/androidTest/java/br/com/basebeagle/ExampleInstrumentedTest.kt b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/androidTest/java/br/com/basebeagle/ExampleInstrumentedTest.kt new file mode 100644 index 00000000..d78e3e64 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/androidTest/java/br/com/basebeagle/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package ${package_name} + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("${package_name}", appContext.packageName) + } +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/AndroidManifest.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8474927c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/MainActivity.kt b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/MainActivity.kt new file mode 100644 index 00000000..d7dcdc88 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/MainActivity.kt @@ -0,0 +1,11 @@ +package ${package_name} + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + } +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/activities/AppBeagleActivity.kt b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/activities/AppBeagleActivity.kt new file mode 100644 index 00000000..db547605 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/activities/AppBeagleActivity.kt @@ -0,0 +1,35 @@ +package ${package_name}.activities + +import android.os.Bundle +import android.view.View +import android.widget.ProgressBar +import android.widget.Toast +import androidx.appcompat.widget.Toolbar +import ${package_name}.R +import br.com.zup.beagle.android.annotation.BeagleComponent +import br.com.zup.beagle.android.view.BeagleActivity +import br.com.zup.beagle.android.view.ServerDrivenState + +@BeagleComponent +class AppBeagleActivity : BeagleActivity() { + + private val progressBar: ProgressBar by lazy { findViewById(R.id.progress_bar) } + private val mToolbar: Toolbar by lazy { findViewById(R.id.custom_toolbar) } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_app_beagle) + } + + override fun getServerDrivenContainerId(): Int = R.id.server_driven_container + + override fun getToolbar(): Toolbar = mToolbar + + override fun onServerDrivenContainerStateChanged(state: ServerDrivenState) { + if (state is ServerDrivenState.Loading) { + progressBar.visibility = if (state.loading) View.VISIBLE else View.GONE + } else if (state is ServerDrivenState.Error) { + Toast.makeText(this, "Error", Toast.LENGTH_LONG).show() + } + } +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/config/AppAplication.kt b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/config/AppAplication.kt new file mode 100644 index 00000000..7b32ab0c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/config/AppAplication.kt @@ -0,0 +1,11 @@ +package ${package_name}.config + +import android.app.Application + +class AppApplication: Application() { + + override fun onCreate() { + super.onCreate() + BeagleSetup().init(this) + } +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/config/AppBeagleConfig.kt b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/config/AppBeagleConfig.kt new file mode 100644 index 00000000..93739c06 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/java/br/com/basebeagle/config/AppBeagleConfig.kt @@ -0,0 +1,18 @@ +package ${package_name}.config + +import br.com.zup.beagle.android.annotation.BeagleComponent +import br.com.zup.beagle.android.setup.BeagleConfig +import br.com.zup.beagle.android.setup.Cache +import br.com.zup.beagle.android.setup.Environment + +@BeagleComponent +class AppBeagleConfig : BeagleConfig { + override val isLoggingEnabled: Boolean = true + override val baseUrl: String get() = "${bff_url}" + override val environment: Environment get() = Environment.DEBUG + override val cache: Cache = Cache( + enabled = true, + maxAge = 300, + memoryMaximumCapacity = 15 + ) +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000..7706ab9e --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/drawable/ic_launcher_background.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..07d5da9c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/layout/activity_app_beagle.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/layout/activity_app_beagle.xml new file mode 100644 index 00000000..db90e713 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/layout/activity_app_beagle.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/layout/activity_main.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..4fa45b0c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..6b78462d --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..6b78462d --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..a571e600 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..61da551c Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..c41dd285 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..db5080a7 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..6dba46da Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..da31a871 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..15ac6817 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..b216f2d3 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..f25a4197 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..e96783cc Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/values/colors.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/values/colors.xml new file mode 100644 index 00000000..136cf929 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ + + + #6200EE + #3700B3 + #03DAC5 + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/values/strings.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..c3124f41 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + ${project_name} + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/values/styles.xml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..22b45c97 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/main/res/values/styles.xml @@ -0,0 +1,10 @@ + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/test/java/br/com/basebeagle/ExampleUnitTest.kt b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/test/java/br/com/basebeagle/ExampleUnitTest.kt new file mode 100644 index 00000000..79670ca1 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/app/src/test/java/br/com/basebeagle/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package ${package_name} + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/build.gradle b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/build.gradle new file mode 100644 index 00000000..26c3c249 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/build.gradle @@ -0,0 +1,29 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + ext.kotlin_version = "${kotlin_v}" + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:4.0.0" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + maven { + url 'https://dl.bintray.com/zupit/repo' + } + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradle.properties b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradle.properties new file mode 100644 index 00000000..9bb1cb21 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradle.properties @@ -0,0 +1,21 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradle/wrapper/gradle-wrapper.jar b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..f6b961fd Binary files /dev/null and b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradle/wrapper/gradle-wrapper.properties b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..96bff2e6 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Jul 16 12:57:23 BRT 2020 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradlew b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradlew new file mode 100644 index 00000000..cccdd3d5 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradlew.bat b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradlew.bat new file mode 100644 index 00000000..f9553162 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/settings.gradle b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/settings.gradle new file mode 100644 index 00000000..eccc290c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/android/settings.gradle @@ -0,0 +1,2 @@ +include ':app' +rootProject.name = "${project_name}" diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/.sourcery.yml b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/.sourcery.yml new file mode 100644 index 00000000..b423de64 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/.sourcery.yml @@ -0,0 +1,8 @@ +sources: + - ${project_name} + - Pods/Beagle/iOS/Sources/Beagle/CodeGeneration/SourceryProtocols.swift +templates: + - Pods/Beagle/iOS/Sources/Beagle/CodeGeneration/Templates +output: ${project_name}/Generated +args: + shouldNotImportBeagleUI: 0 diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/Podfile b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/Podfile new file mode 100644 index 00000000..bb33abbc --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/Podfile @@ -0,0 +1,14 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target '${project_name}' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + pod 'Beagle' + pod 'Beagle/Preview' + pod 'YogaKit', :git => 'https://github.com/ZupIT/YogaKit' + + # Pods for test + +end diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods.xcodeproj/project.pbxproj b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods.xcodeproj/project.pbxproj new file mode 100644 index 00000000..54101e8c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods.xcodeproj/project.pbxproj @@ -0,0 +1,387 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 7C8B0E8E24D1EC2C000A1F31 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8B0E8D24D1EC2C000A1F31 /* AppDelegate.swift */; }; + 7C8B0E9024D1EC2C000A1F31 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8B0E8F24D1EC2C000A1F31 /* SceneDelegate.swift */; }; + 7C8B0E9224D1EC2C000A1F31 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8B0E9124D1EC2C000A1F31 /* ViewController.swift */; }; + 7C8B0E9524D1EC2C000A1F31 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7C8B0E9324D1EC2C000A1F31 /* Main.storyboard */; }; + 7C8B0E9724D1EC30000A1F31 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7C8B0E9624D1EC30000A1F31 /* Assets.xcassets */; }; + 7C8B0E9A24D1EC30000A1F31 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7C8B0E9824D1EC30000A1F31 /* LaunchScreen.storyboard */; }; + 7C8B0EA224D1EF3F000A1F31 /* BeagleConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8B0EA124D1EF3F000A1F31 /* BeagleConfig.swift */; }; + 7C8B0EA424D1F011000A1F31 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8B0EA324D1F011000A1F31 /* Constants.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 7C8B0E8A24D1EC2C000A1F31 /* ${project_name}.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ${project_name}.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7C8B0E8D24D1EC2C000A1F31 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7C8B0E8F24D1EC2C000A1F31 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 7C8B0E9124D1EC2C000A1F31 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 7C8B0E9424D1EC2C000A1F31 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 7C8B0E9624D1EC30000A1F31 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7C8B0E9924D1EC30000A1F31 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 7C8B0E9B24D1EC30000A1F31 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7C8B0EA124D1EF3F000A1F31 /* BeagleConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeagleConfig.swift; sourceTree = ""; }; + 7C8B0EA324D1F011000A1F31 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7C8B0E8724D1EC2C000A1F31 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7C8B0E8124D1EC2B000A1F31 = { + isa = PBXGroup; + children = ( + 7C8B0E8C24D1EC2C000A1F31 /* ${project_name} */, + 7C8B0E8B24D1EC2C000A1F31 /* Products */, + ); + sourceTree = ""; + }; + 7C8B0E8B24D1EC2C000A1F31 /* Products */ = { + isa = PBXGroup; + children = ( + 7C8B0E8A24D1EC2C000A1F31 /* ${project_name}.app */, + ); + name = Products; + sourceTree = ""; + }; + 7C8B0E8C24D1EC2C000A1F31 /* ${project_name} */ = { + isa = PBXGroup; + children = ( + 7C8B0EA624D1F01F000A1F31 /* Commom */, + 7C8B0EA524D1F016000A1F31 /* BeagleConfig */, + 7C8B0E8D24D1EC2C000A1F31 /* AppDelegate.swift */, + 7C8B0E8F24D1EC2C000A1F31 /* SceneDelegate.swift */, + 7C8B0E9124D1EC2C000A1F31 /* ViewController.swift */, + 7C8B0E9324D1EC2C000A1F31 /* Main.storyboard */, + 7C8B0E9624D1EC30000A1F31 /* Assets.xcassets */, + 7C8B0E9824D1EC30000A1F31 /* LaunchScreen.storyboard */, + 7C8B0E9B24D1EC30000A1F31 /* Info.plist */, + ); + path = ${project_name}; + sourceTree = ""; + }; + 7C8B0EA524D1F016000A1F31 /* BeagleConfig */ = { + isa = PBXGroup; + children = ( + 7C8B0EA124D1EF3F000A1F31 /* BeagleConfig.swift */, + ); + path = BeagleConfig; + sourceTree = ""; + }; + 7C8B0EA624D1F01F000A1F31 /* Commom */ = { + isa = PBXGroup; + children = ( + 7C8B0EA324D1F011000A1F31 /* Constants.swift */, + ); + path = Commom; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7C8B0E8924D1EC2C000A1F31 /* ${project_name} */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7C8B0E9E24D1EC30000A1F31 /* Build configuration list for PBXNativeTarget "${project_name}" */; + buildPhases = ( + 7C8B0EA724D1F0E9000A1F31 /* Sourcery */, + 7C8B0E8624D1EC2C000A1F31 /* Sources */, + 7C8B0E8724D1EC2C000A1F31 /* Frameworks */, + 7C8B0E8824D1EC2C000A1F31 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ${project_name}; + productName = ${project_name}; + productReference = 7C8B0E8A24D1EC2C000A1F31 /* ${project_name}.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7C8B0E8224D1EC2C000A1F31 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1150; + LastUpgradeCheck = 1150; + ORGANIZATIONNAME = "${organization_name}"; + TargetAttributes = { + 7C8B0E8924D1EC2C000A1F31 = { + CreatedOnToolsVersion = 11.5; + }; + }; + }; + buildConfigurationList = 7C8B0E8524D1EC2C000A1F31 /* Build configuration list for PBXProject "${project_name}" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7C8B0E8124D1EC2B000A1F31; + productRefGroup = 7C8B0E8B24D1EC2C000A1F31 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7C8B0E8924D1EC2C000A1F31 /* ${project_name} */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7C8B0E8824D1EC2C000A1F31 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C8B0E9A24D1EC30000A1F31 /* LaunchScreen.storyboard in Resources */, + 7C8B0E9724D1EC30000A1F31 /* Assets.xcassets in Resources */, + 7C8B0E9524D1EC2C000A1F31 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 7C8B0EA724D1F0E9000A1F31 /* Sourcery */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = Sourcery; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "sourcery --config $SRCROOT\n\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7C8B0E8624D1EC2C000A1F31 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C8B0EA424D1F011000A1F31 /* Constants.swift in Sources */, + 7C8B0E9224D1EC2C000A1F31 /* ViewController.swift in Sources */, + 7C8B0E8E24D1EC2C000A1F31 /* AppDelegate.swift in Sources */, + 7C8B0E9024D1EC2C000A1F31 /* SceneDelegate.swift in Sources */, + 7C8B0EA224D1EF3F000A1F31 /* BeagleConfig.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 7C8B0E9324D1EC2C000A1F31 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7C8B0E9424D1EC2C000A1F31 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 7C8B0E9824D1EC30000A1F31 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7C8B0E9924D1EC30000A1F31 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7C8B0E9C24D1EC30000A1F31 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 7C8B0E9D24D1EC30000A1F31 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7C8B0E9F24D1EC30000A1F31 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = ${project_name}/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = ${organization_id}.${project_name}; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 7C8B0EA024D1EC30000A1F31 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = ${project_name}/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = ${organization_id}.${project_name}; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7C8B0E8524D1EC2C000A1F31 /* Build configuration list for PBXProject "${project_name}" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7C8B0E9C24D1EC30000A1F31 /* Debug */, + 7C8B0E9D24D1EC30000A1F31 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7C8B0E9E24D1EC30000A1F31 /* Build configuration list for PBXNativeTarget "${project_name}" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7C8B0E9F24D1EC30000A1F31 /* Debug */, + 7C8B0EA024D1EC30000A1F31 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7C8B0E8224D1EC2C000A1F31 /* Project object */; +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/AppDelegate.swift b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/AppDelegate.swift new file mode 100644 index 00000000..e2d6c510 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/AppDelegate.swift @@ -0,0 +1,34 @@ +// +// AppDelegate.swift +// ${project_name} +// +// Created by ${organization_name} on ${date}. +// Copyright © ${year} ${organization_name}. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Assets.xcassets/AppIcon.appiconset/Contents.json b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..faeb2bbb --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images": [ + { + "idiom": "iphone", + "scale": "2x", + "size": "20x20" + }, + { + "idiom": "iphone", + "scale": "3x", + "size": "20x20" + }, + { + "idiom": "iphone", + "scale": "2x", + "size": "29x29" + }, + { + "idiom": "iphone", + "scale": "3x", + "size": "29x29" + }, + { + "idiom": "iphone", + "scale": "2x", + "size": "40x40" + }, + { + "idiom": "iphone", + "scale": "3x", + "size": "40x40" + }, + { + "idiom": "iphone", + "scale": "2x", + "size": "60x60" + }, + { + "idiom": "iphone", + "scale": "3x", + "size": "60x60" + }, + { + "idiom": "ipad", + "scale": "1x", + "size": "20x20" + }, + { + "idiom": "ipad", + "scale": "2x", + "size": "20x20" + }, + { + "idiom": "ipad", + "scale": "1x", + "size": "29x29" + }, + { + "idiom": "ipad", + "scale": "2x", + "size": "29x29" + }, + { + "idiom": "ipad", + "scale": "1x", + "size": "40x40" + }, + { + "idiom": "ipad", + "scale": "2x", + "size": "40x40" + }, + { + "idiom": "ipad", + "scale": "1x", + "size": "76x76" + }, + { + "idiom": "ipad", + "scale": "2x", + "size": "76x76" + }, + { + "idiom": "ipad", + "scale": "2x", + "size": "83.5x83.5" + }, + { + "idiom": "ios-marketing", + "scale": "1x", + "size": "1024x1024" + } + ], + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Assets.xcassets/Contents.json b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Assets.xcassets/Contents.json new file mode 100644 index 00000000..74d6a722 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info": { + "author": "xcode", + "version": 1 + } +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Base.lproj/LaunchScreen.storyboard b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..865e9329 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Base.lproj/Main.storyboard b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Base.lproj/Main.storyboard new file mode 100644 index 00000000..25a76385 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/BeagleConfig/BeagleConfig.swift b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/BeagleConfig/BeagleConfig.swift new file mode 100644 index 00000000..da71fda7 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/BeagleConfig/BeagleConfig.swift @@ -0,0 +1,34 @@ +// +// BeagleConfig.swift +// ${project_name} +// +// Created by ${organization_name} on ${date}. +// Copyright © ${year} ${organization_name}. All rights reserved. +// + +import Foundation +import Beagle + +class BeagleConfig { + + static let dependencies = BeagleDependencies() + + /// Config Beagle + static func config() { + dependencies.urlBuilder = UrlBuilder(baseUrl: URL(string: Constants.serverAdress)) + Beagle.dependencies = dependencies + + BeagleConfig.registerWidgets() + BeagleConfig.registerCustomActions() + } + + /// Register custom widgets + static private func registerWidgets() { + + } + + /// Register custom actions + static private func registerCustomActions() { + + } +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Commom/Constants.swift b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Commom/Constants.swift new file mode 100644 index 00000000..fc4ab025 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Commom/Constants.swift @@ -0,0 +1,13 @@ +// +// Constants.swift +// ${project_name} +// +// Created by ${organization_name} on ${date}. +// Copyright © ${year} ${organization_name}. All rights reserved. +// + +import Foundation + +struct Constants { + static let serverAdress = "${bff_url}" +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Info.plist b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Info.plist new file mode 100644 index 00000000..2a3483c0 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/Info.plist @@ -0,0 +1,64 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/SceneDelegate.swift b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/SceneDelegate.swift new file mode 100644 index 00000000..4215a9c9 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/SceneDelegate.swift @@ -0,0 +1,50 @@ +// +// SceneDelegate.swift +// ${project_name} +// +// Created by ${organization_name} on ${date}. +// Copyright © ${year} ${organization_name}. All rights reserved. +// + +import UIKit +import Beagle + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + guard let _ = (scene as? UIWindowScene) else { return } + BeagleConfig.config() + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/ViewController.swift b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/ViewController.swift new file mode 100644 index 00000000..a016377d --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/_vendor/ios/cocoapods/ViewController.swift @@ -0,0 +1,19 @@ +// +// ViewController.swift +// ${project_name} +// +// Created by ${organization_name} on ${date}. +// Copyright © ${year} ${organization_name}. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + +} diff --git a/beagle/generate/scaffold/src/formula/mobile-generator/mobile.sh b/beagle/generate/scaffold/src/formula/mobile-generator/mobile.sh new file mode 100644 index 00000000..92397ee3 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/mobile-generator/mobile.sh @@ -0,0 +1,155 @@ +#!/bin/bash + +formatPackageName() { + echo "$1" | tr "." "/" +} + +createPackage() { + if [[ ! $1 == "br/com/basebeagle" ]]; then + mkdir -p app/src/androidTest/java/"$1" + cp -r app/src/androidTest/java/br/com/basebeagle/* app/src/androidTest/java/"$1" + rm -rf app/src/androidTest/java/br/com/basebeagle + + mkdir -p app/src/main/java/"$1" + cp -r app/src/main/java/br/com/basebeagle/* app/src/main/java/"$1" + rm -rf app/src/main/java/br/com/basebeagle + + mkdir -p app/src/test/java/"$1" + cp -r app/src/test/java/br/com/basebeagle/* app/src/test/java/"$1" + rm -rf app/src/test/java/br/com/basebeagle + + find app/src/ -empty -type d -delete + fi +} + +replacePackageName() { + local package_name=$1 + shift + + local arr=("$@") + for file in "${arr[@]}" + do + sed -i -e "s/\${package_name}/$package_name/" "$file" + done +} + +formatHeaders() { + local project_name=$1 + local organization_name=$2 + local complete_date + local year + + complete_date=$(date +'%d/%m/%Y') + year=$(date +'%Y') + shift + shift + + local arr=("$@") + for file in "${arr[@]}" + do + sed -i -e "s/\${project_name}/$project_name/" "$file" + sed -i -e "s/\${organization_name}/$organization_name/" "$file" + sed -i -e "s,\${date},$complete_date," "$file" + sed -i -e "s,\${year},$year," "$file" + done +} + +runMobile() { + os=$1 + project_name=$2 + slug=$3 + + mkdir "$CURRENT_PWD"/"$slug" + + if [[ $os == "ios" ]]; then + organization_name=$4 + organization_id=$5 + beagle_version=$6 + bff_url=$7 + sourcery=$8 + + cp -r formula/mobile-generator/_vendor/ios/. "$CURRENT_PWD"/"$slug" + + cd "$CURRENT_PWD"/"$slug" || exit + + mv cocoapods "$slug" + mv cocoapods.xcodeproj "$slug".xcodeproj + + sed -i -e "s,\${project_name},$slug,g" "$slug".xcodeproj/project.pbxproj + + sed -i -e "s,\${organization_name},$organization_name," "$slug".xcodeproj/project.pbxproj + + sed -i -e "s,\${organization_id},$organization_id," "$slug".xcodeproj/project.pbxproj + + sed -i -e "s,\${bff_url},$bff_url," "$slug"/Commom/Constants.swift + + sed -i -e "s,\${project_name},$slug," Podfile + + sed -i -e "s,\${project_name},$slug," .sourcery.yml + + if [[ $beagle_version != "latest" ]]; then + sed -i -e "s/pod 'Beagle'/pod 'Beagle', '$beagle_version'/" Podfile + fi + + if [[ $sourcery == "n" ]]; then + rm .sourcery.yml + sed -i -e "159,179d" "$slug".xcodeproj/project.pbxproj # removing lines 159-179 + sed -i -e "99d" "$slug".xcodeproj/project.pbxproj # removing line 99 + fi + + files=( + "$slug"/ViewController.swift + "$slug"/SceneDelegate.swift + "$slug"/AppDelegate.swift + "$slug"/Commom/Constants.swift + "$slug"/BeagleConfig/BeagleConfig.swift + ) + + formatHeaders "$project_name" "$organization_name" "${files[@]}" + else + package_name=$4 + min_sdk=$5 + target_sdk=$6 + kotlin_version=$7 + beagle_version=$8 + bff_url=$9 + + cp -r formula/mobile-generator/_vendor/android/* "$CURRENT_PWD"/"$slug" + + cd "$CURRENT_PWD"/"$slug" || exit + + sed -i -e "s,\${kotlin_v},$kotlin_version," build.gradle + + sed -i -e "s,\${project_name},$project_name," settings.gradle + + sed -i -e "s,\${project_name},$project_name," app/src/main/res/values/strings.xml + + sed -i -e "s,\${beagle_version},$beagle_version," app/build.gradle + + formatted_package_name=$(formatPackageName "$package_name") + createPackage "$formatted_package_name" + + sed -i -e "s,\${bff_url},$bff_url," app/src/main/java/"$formatted_package_name"/config/AppBeagleConfig.kt + + sed -i -e "s,\${min_sdk},$min_sdk," app/build.gradle + + sed -i -e "s,\${target_sdk},$target_sdk," app/build.gradle + + files=( + app/src/main/AndroidManifest.xml + app/build.gradle + app/src/androidTest/java/"$formatted_package_name"/ExampleInstrumentedTest.kt + app/src/main/java/"$formatted_package_name"/MainActivity.kt + app/src/main/java/"$formatted_package_name"/activities/AppBeagleActivity.kt + app/src/main/java/"$formatted_package_name"/config/AppAplication.kt + app/src/main/java/"$formatted_package_name"/config/AppBeagleConfig.kt + app/src/test/java/"$formatted_package_name"/ExampleUnitTest.kt + ) + + replacePackageName "$package_name" "${files[@]}" + fi + + if [[ $DOCKER_EXECUTION ]]; then + chown 1000:1000 -R "$CURRENT_PWD"/"$slug" + fi +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/.browserslistrc b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/.browserslistrc new file mode 100644 index 00000000..0ccadaf3 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/.browserslistrc @@ -0,0 +1,18 @@ +# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries + +# For the full list of supported browsers by the Angular framework, please see: +# https://angular.io/guide/browser-support + +# You can see what browsers were selected by your queries by running: +# npx browserslist + +last 1 Chrome version +last 1 Firefox version +last 2 Edge major versions +last 2 Safari major versions +last 2 iOS major versions +Firefox ESR +not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line. +not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/.editorconfig b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/.editorconfig new file mode 100644 index 00000000..59d9a3a3 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/.editorconfig @@ -0,0 +1,16 @@ +# Editor configuration, see https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.ts] +quote_type = single + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/.gitignore b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/.gitignore new file mode 100644 index 00000000..2183099a --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/.gitignore @@ -0,0 +1,50 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp +/out-tsc +# Only exists if Bazel was run +/bazel-out + +# dependencies +/node_modules + +# profiling files +chrome-profiler-events*.json +speed-measure-plugin*.json + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings + +# System Files +.DS_Store +Thumbs.db + +# Beagle +src/app/.beagle.module.generated.ts +src/app/.beagle.module.original.ts diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/README.md b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/README.md new file mode 100644 index 00000000..73e54055 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/README.md @@ -0,0 +1,27 @@ +# BeagleWeb + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.4. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/angular.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/angular.json new file mode 100644 index 00000000..945fc2b9 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/angular.json @@ -0,0 +1,135 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "beagleWeb": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/beagleWeb", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.app.json", + "aot": true, + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [], + "fileReplacements": [ + { + "replace": "src/app/beagle.module.ts", + "with": "src/app/.beagle.module.generated.ts" + } + ] + }, + "configurations": { + "production": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + }, + { + "replace": "src/app/beagle.module.ts", + "with": "src/app/.beagle.module.generated.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" + } + ] + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "beagleWeb:build" + }, + "configurations": { + "production": { + "browserTarget": "beagleWeb:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "beagleWeb:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "tsconfig.app.json", + "tsconfig.spec.json", + "e2e/tsconfig.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + }, + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "e2e/protractor.conf.js", + "devServerTarget": "beagleWeb:serve" + }, + "configurations": { + "production": { + "devServerTarget": "beagleWeb:serve:production" + } + } + } + } + } + }, + "defaultProject": "beagleWeb" +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/protractor.conf.js b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/protractor.conf.js new file mode 100644 index 00000000..09a96840 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/protractor.conf.js @@ -0,0 +1,36 @@ +// @ts-check +// Protractor configuration file, see link for more information +// https://github.com/angular/protractor/blob/master/lib/config.ts + +const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); + +/** + * @type { import("protractor").Config } + */ +exports.config = { + allScriptsTimeout: 11000, + specs: [ + './src/**/*.e2e-spec.ts' + ], + capabilities: { + browserName: 'chrome' + }, + directConnect: true, + baseUrl: 'http://localhost:4200/', + framework: 'jasmine', + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 30000, + print: function() {} + }, + onPrepare() { + require('ts-node').register({ + project: require('path').join(__dirname, './tsconfig.json') + }); + jasmine.getEnv().addReporter(new SpecReporter({ + spec: { + displayStacktrace: StacktraceOption.PRETTY + } + })); + } +}; diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/src/app.e2e-spec.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/src/app.e2e-spec.ts new file mode 100644 index 00000000..3407fe68 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/src/app.e2e-spec.ts @@ -0,0 +1,23 @@ +import { AppPage } from './app.po'; +import { browser, logging } from 'protractor'; + +describe('workspace-project App', () => { + let page: AppPage; + + beforeEach(() => { + page = new AppPage(); + }); + + it('should display welcome message', () => { + page.navigateTo(); + expect(page.getTitleText()).toEqual('beagleWeb app is running!'); + }); + + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry)); + }); +}); diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/src/app.po.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/src/app.po.ts new file mode 100644 index 00000000..b68475e0 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/src/app.po.ts @@ -0,0 +1,11 @@ +import { browser, by, element } from 'protractor'; + +export class AppPage { + navigateTo(): Promise { + return browser.get(browser.baseUrl) as Promise; + } + + getTitleText(): Promise { + return element(by.css('app-root .content span')).getText() as Promise; + } +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/tsconfig.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/tsconfig.json new file mode 100644 index 00000000..1807fd68 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/e2e/tsconfig.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": "../out-tsc/e2e", + "module": "commonjs", + "target": "es2018", + "types": [ + "jasmine", + "jasminewd2", + "node" + ] + } +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/karma.conf.js b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/karma.conf.js new file mode 100644 index 00000000..48d4a4af --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/karma.conf.js @@ -0,0 +1,32 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, './coverage/beagleWeb'), + reports: ['html', 'lcovonly', 'text-summary'], + fixWebpackSourcePaths: true + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false, + restartOnFileChange: true + }); +}; diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/package.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/package.json new file mode 100644 index 00000000..05917bbb --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/package.json @@ -0,0 +1,49 @@ +{ + "name": "${project_name}", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "npx beagle view-engine --npm && ng build --prod", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e", + "serve": "npx beagle view-engine --npm && ng serve" + }, + "private": true, + "dependencies": { + "@angular/animations": "~10.0.5", + "@angular/common": "~10.0.5", + "@angular/compiler": "~10.0.5", + "@angular/core": "~10.0.5", + "@angular/forms": "~10.0.5", + "@angular/platform-browser": "~10.0.5", + "@angular/platform-browser-dynamic": "~10.0.5", + "@angular/router": "~10.0.5", + "@zup-it/beagle-angular": "^${beagle_version}", + "rxjs": "~6.5.5", + "tslib": "^2.0.0", + "zone.js": "~0.10.3" + }, + "devDependencies": { + "@angular-devkit/build-angular": "~0.1000.4", + "@angular/cli": "~10.0.4", + "@angular/compiler-cli": "~10.0.5", + "@types/node": "^12.11.1", + "@types/jasmine": "~3.5.0", + "@types/jasminewd2": "~2.0.3", + "codelyzer": "^6.0.0", + "jasmine-core": "~3.5.0", + "jasmine-spec-reporter": "~5.0.0", + "karma": "~5.0.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~3.0.2", + "karma-jasmine": "~3.3.0", + "karma-jasmine-html-reporter": "^1.5.0", + "protractor": "~7.0.0", + "ts-node": "latest", + "tslint": "~6.1.0", + "typescript": "~3.9.5", + "amd-loader": "latest" + } +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.css b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.css new file mode 100755 index 00000000..e69de29b diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.html b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.html new file mode 100755 index 00000000..e644211c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.html @@ -0,0 +1 @@ + diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.spec.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.spec.ts new file mode 100755 index 00000000..89afb3f4 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.spec.ts @@ -0,0 +1,31 @@ +import { TestBed, async } from '@angular/core/testing'; +import { AppComponent } from './app.component'; + +describe('AppComponent', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + }).compileComponents(); + })); + + it('should create the app', () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); + + it(`should have as title 'beagleWeb'`, () => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.componentInstance; + expect(app.title).toEqual('beagleWeb'); + }); + + it('should render title', () => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.nativeElement; + expect(compiled.querySelector('.content span').textContent).toContain('beagleWeb app is running!'); + }); +}); diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.ts new file mode 100755 index 00000000..d0e2ac40 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.component.ts @@ -0,0 +1,20 @@ +import { Component } from '@angular/core'; +import { LoadParams } from '@zup-it/beagle-web'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) + +export class AppComponent { + title = 'beagleWeb'; + + loadParams: LoadParams; + + constructor() { + this.loadParams = { + path: '/screen' + }; + } +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.module.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.module.ts new file mode 100755 index 00000000..f5c73aa5 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/app.module.ts @@ -0,0 +1,18 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import { Beagle } from './beagle.module'; + +import { AppComponent } from './app.component'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + Beagle + ], + providers: [], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/beagle-components.module.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/beagle-components.module.ts new file mode 100755 index 00000000..a9fe2258 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/beagle-components.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core' +// import all the components you're going to use with beagle + +const components = [ + // your components +] + +@NgModule({ + declarations: components, + entryComponents: components, + exports: components, + imports: [ + // everything your components depend on + ], +}) +export class BeagleComponentsModule {} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/beagle.module.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/beagle.module.ts new file mode 100755 index 00000000..060bf5ef --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/app/beagle.module.ts @@ -0,0 +1,14 @@ +import { BeagleModule } from '@zup-it/beagle-angular'; +// import all the components you wish to use with Beagle. + +@BeagleModule({ + baseUrl: 'http://localhost:8080', + module: { + path: './beagle-components.module', + name: 'BeagleComponentsModule', + }, + components: { + // Associate every beagle component to your angular component. + }, +}) +export class Beagle {} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/assets/.gitkeep b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/assets/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/assets/test.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/assets/test.json new file mode 100644 index 00000000..695189a9 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/assets/test.json @@ -0,0 +1,21 @@ +{ + "_beagleComponent_": "beagle:container", + "children": [ + { + "_beagleComponent_":"beagle:text", + "text":"Your first text" + }, + { + "_beagleComponent_":"beagle:text", + "style":{ + "padding":{ + "top":{ + "value":10, + "type": "REAL" + } + } + }, + "text":"Your second text" + } + ] +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/environments/environment.prod.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/environments/environment.prod.ts new file mode 100644 index 00000000..3612073b --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = { + production: true +}; diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/environments/environment.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/environments/environment.ts new file mode 100644 index 00000000..7b4f817a --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/environments/environment.ts @@ -0,0 +1,16 @@ +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. + +export const environment = { + production: false +}; + +/* + * For easier debugging in development mode, you can import the following file + * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. + * + * This import should be commented out in production mode because it will have a negative impact + * on performance if an error is thrown. + */ +// import 'zone.js/dist/zone-error'; // Included with Angular CLI. diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/favicon.ico b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/favicon.ico new file mode 100644 index 00000000..997406ad Binary files /dev/null and b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/favicon.ico differ diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/index.html b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/index.html new file mode 100644 index 00000000..72917a2c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/index.html @@ -0,0 +1,13 @@ + + + + + BeagleWeb + + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/main.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/main.ts new file mode 100644 index 00000000..c7b673cf --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/main.ts @@ -0,0 +1,12 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/polyfills.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/polyfills.ts new file mode 100644 index 00000000..03711e5d --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/polyfills.ts @@ -0,0 +1,63 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/guide/browser-support + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** + * Web Animations `@angular/platform-browser/animations` + * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. + * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). + */ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + * because those flags need to be set before `zone.js` being loaded, and webpack + * will put import in the top of bundle, so user need to create a separate file + * in this directory (for example: zone-flags.ts), and put the following flags + * into that file, and then add the following code before importing zone.js. + * import './zone-flags'; + * + * The flags allowed in zone-flags.ts are listed here. + * + * The following flags will work for all browsers. + * + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + * + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + * + * (window as any).__Zone_enable_cross_context_check = true; + * + */ + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/styles.css b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/styles.css new file mode 100644 index 00000000..90d4ee00 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/test.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/test.ts new file mode 100644 index 00000000..6cabb389 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/src/test.ts @@ -0,0 +1,21 @@ +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: { + context(path: string, deep?: boolean, filter?: RegExp): { + keys(): string[]; + (id: string): T; + }; +}; + +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); + +const context = require.context('./', true, /\.spec\.ts$/); +context.keys().map(context); diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.app.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.app.json new file mode 100644 index 00000000..232c3a5c --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.app.json @@ -0,0 +1,15 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.base.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.base.json new file mode 100644 index 00000000..f69f6541 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.base.json @@ -0,0 +1,20 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "es2015", + "module": "es2020", + "lib": [ + "es2018", + "dom" + ] + } +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.json new file mode 100644 index 00000000..2338536e --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.json @@ -0,0 +1,17 @@ +/* + This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience. + It is not intended to be used to perform a compilation. + + To learn more about this file see: https://angular.io/config/solution-tsconfig. +*/ +{ + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.spec.json" + } +] +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.spec.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.spec.json new file mode 100644 index 00000000..729a6d63 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tsconfig.spec.json @@ -0,0 +1,18 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "files": [ + "src/test.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tslint.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tslint.json new file mode 100644 index 00000000..6c93f670 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-angular/tslint.json @@ -0,0 +1,152 @@ +{ + "extends": "tslint:recommended", + "rules": { + "align": { + "options": [ + "parameters", + "statements" + ] + }, + "array-type": false, + "arrow-return-shorthand": true, + "component-class-suffix": true, + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ], + "contextual-lifecycle": true, + "curly": true, + "deprecation": { + "severity": "warning" + }, + "directive-class-suffix": true, + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "eofline": true, + "import-blacklist": [ + true, + "rxjs/Rx" + ], + "import-spacing": true, + "indent": { + "options": [ + "spaces" + ] + }, + "max-classes-per-file": false, + "max-line-length": [ + true, + 140 + ], + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-conflicting-lifecycle": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-empty": false, + "no-host-metadata-property": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-input-rename": true, + "no-inputs-metadata-property": true, + "no-non-null-assertion": true, + "no-output-native": true, + "no-output-on-prefix": true, + "no-output-rename": true, + "no-outputs-metadata-property": true, + "no-redundant-jsdoc": true, + "no-switch-case-fall-through": true, + "no-var-requires": false, + "object-literal-key-quotes": [ + true, + "as-needed" + ], + "quotemark": [ + true, + "single" + ], + "semicolon": { + "options": [ + "always" + ] + }, + "space-before-function-paren": { + "options": { + "anonymous": "never", + "asyncArrow": "always", + "constructor": "never", + "method": "never", + "named": "never" + } + }, + "template-banana-in-box": true, + "template-no-negated-async": true, + "typedef": [ + true, + "call-signature" + ], + "typedef-whitespace": { + "options": [ + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + }, + { + "call-signature": "onespace", + "index-signature": "onespace", + "parameter": "onespace", + "property-declaration": "onespace", + "variable-declaration": "onespace" + } + ] + }, + "use-lifecycle-interface": true, + "use-pipe-transform-interface": true, + "variable-name": { + "options": [ + "ban-keywords", + "check-format", + "allow-pascal-case" + ] + }, + "whitespace": { + "options": [ + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type", + "check-typecast" + ] + } + }, + "rulesDirectory": [ + "codelyzer" + ] +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/.gitignore b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/.gitignore new file mode 100644 index 00000000..4d29575d --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/README.md b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/README.md new file mode 100644 index 00000000..74735dc6 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/README.md @@ -0,0 +1,44 @@ +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.
+You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.
+It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.
+Your app is ready to be deployed! + +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Learn More + +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). + +To learn React, check out the [React documentation](https://reactjs.org/). diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/package.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/package.json new file mode 100644 index 00000000..9473c6ad --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/package.json @@ -0,0 +1,40 @@ +{ + "browserslist": { + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ], + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ] + }, + "dependencies": { + "@testing-library/jest-dom": "^4.2.4", + "@testing-library/react": "^9.5.0", + "@testing-library/user-event": "^7.2.1", + "@types/jest": "^24.9.1", + "@types/node": "^12.12.52", + "@types/react": "^16.9.43", + "@types/react-dom": "^16.9.8", + "@zup-it/beagle-react": "^${beagle_version}", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-scripts": "3.4.1", + "typescript": "^3.7.5" + }, + "eslintConfig": { + "extends": "react-app" + }, + "name": "${project_name}", + "private": true, + "scripts": { + "build": "react-scripts build", + "eject": "react-scripts eject", + "start": "react-scripts start", + "test": "react-scripts test" + }, + "version": "0.1.0" +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/favicon.ico b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/favicon.ico new file mode 100644 index 00000000..bcd5dfd6 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/favicon.ico differ diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/index.html b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/index.html new file mode 100644 index 00000000..aa069f27 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/index.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + React App + + + +
+ + + diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/logo192.png b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/logo192.png new file mode 100644 index 00000000..fc44b0a3 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/logo192.png differ diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/logo512.png b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/logo512.png new file mode 100644 index 00000000..a4e47a65 Binary files /dev/null and b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/logo512.png differ diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/manifest.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/manifest.json new file mode 100644 index 00000000..080d6c77 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/robots.txt b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/robots.txt new file mode 100644 index 00000000..e9e57dc4 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/test.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/test.json new file mode 100644 index 00000000..6040c4ef --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/public/test.json @@ -0,0 +1,21 @@ +{ + "_beagleComponent_": "beagle:container", + "children": [ + { + "_beagleComponent_":"beagle:text", + "text":"first text" + }, + { + "_beagleComponent_":"beagle:text", + "style":{ + "padding":{ + "top":{ + "value":10, + "type": "REAL" + } + } + }, + "text":"second text" + } + ] +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/App.css b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/App.css new file mode 100644 index 00000000..74b5e053 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/App.css @@ -0,0 +1,38 @@ +.App { + text-align: center; +} + +.App-logo { + height: 40vmin; + pointer-events: none; +} + +@media (prefers-reduced-motion: no-preference) { + .App-logo { + animation: App-logo-spin infinite 20s linear; + } +} + +.App-header { + background-color: #282c34; + min-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: calc(10px + 2vmin); + color: white; +} + +.App-link { + color: #61dafb; +} + +@keyframes App-logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/App.test.tsx b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/App.test.tsx new file mode 100644 index 00000000..4db7ebc2 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/App.test.tsx @@ -0,0 +1,9 @@ +import React from 'react'; +import { render } from '@testing-library/react'; +import App from './App'; + +test('renders learn react link', () => { + const { getByText } = render(); + const linkElement = getByText(/learn react/i); + expect(linkElement).toBeInTheDocument(); +}); diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/App.tsx b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/App.tsx new file mode 100644 index 00000000..86603eef --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/App.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import './App.css'; +import { BeagleProvider, BeagleRemoteView } from '@zup-it/beagle-react'; +import BeagleService from './beagle/beagle-service'; + +function App() { + return ( + + + + ); +} + +export default App; diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/beagle/beagle-service.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/beagle/beagle-service.ts new file mode 100644 index 00000000..989daffc --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/beagle/beagle-service.ts @@ -0,0 +1,6 @@ +import { createBeagleUIService } from '@zup-it/beagle-react'; + +export default createBeagleUIService({ + baseUrl: 'http://localhost:8080', + components: {}, +}); diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/index.css b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/index.css new file mode 100644 index 00000000..ec2585e8 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/index.css @@ -0,0 +1,13 @@ +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/index.tsx b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/index.tsx new file mode 100644 index 00000000..f5185c1e --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/index.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import './index.css'; +import App from './App'; +import * as serviceWorker from './serviceWorker'; + +ReactDOM.render( + + + , + document.getElementById('root') +); + +// If you want your app to work offline and load faster, you can change +// unregister() to register() below. Note this comes with some pitfalls. +// Learn more about service workers: https://bit.ly/CRA-PWA +serviceWorker.unregister(); diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/logo.svg b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/logo.svg new file mode 100644 index 00000000..6b60c104 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/react-app-env.d.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/react-app-env.d.ts new file mode 100644 index 00000000..6431bc5f --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/serviceWorker.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/serviceWorker.ts new file mode 100644 index 00000000..b09523f1 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/serviceWorker.ts @@ -0,0 +1,149 @@ +// This optional code is used to register a service worker. +// register() is not called by default. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on subsequent visits to a page, after all the +// existing tabs open on the page have been closed, since previously cached +// resources are updated in the background. + +// To learn more about the benefits of this model and instructions on how to +// opt-in, read https://bit.ly/CRA-PWA + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.0/8 are considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); + +type Config = { + onSuccess?: (registration: ServiceWorkerRegistration) => void; + onUpdate?: (registration: ServiceWorkerRegistration) => void; +}; + +export function register(config?: Config) { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL( + process.env.PUBLIC_URL, + window.location.href + ); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebook/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (isLocalhost) { + // This is running on localhost. Let's check if a service worker still exists or not. + checkValidServiceWorker(swUrl, config); + + // Add some additional logging to localhost, pointing developers to the + // service worker/PWA documentation. + navigator.serviceWorker.ready.then(() => { + console.log( + 'This web app is being served cache-first by a service ' + + 'worker. To learn more, visit https://bit.ly/CRA-PWA' + ); + }); + } else { + // Is not localhost. Just register service worker + registerValidSW(swUrl, config); + } + }); + } +} + +function registerValidSW(swUrl: string, config?: Config) { + navigator.serviceWorker + .register(swUrl) + .then(registration => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + if (installingWorker == null) { + return; + } + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the updated precached content has been fetched, + // but the previous service worker will still serve the older + // content until all client tabs are closed. + console.log( + 'New content is available and will be used when all ' + + 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' + ); + + // Execute callback + if (config && config.onUpdate) { + config.onUpdate(registration); + } + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + + // Execute callback + if (config && config.onSuccess) { + config.onSuccess(registration); + } + } + } + }; + }; + }) + .catch(error => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl: string, config?: Config) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl, { + headers: { 'Service-Worker': 'script' } + }) + .then(response => { + // Ensure service worker exists, and that we really are getting a JS file. + const contentType = response.headers.get('content-type'); + if ( + response.status === 404 || + (contentType != null && contentType.indexOf('javascript') === -1) + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then(registration => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl, config); + } + }) + .catch(() => { + console.log( + 'No internet connection found. App is running in offline mode.' + ); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready + .then(registration => { + registration.unregister(); + }) + .catch(error => { + console.error(error.message); + }); + } +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/setupTests.ts b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/setupTests.ts new file mode 100644 index 00000000..74b1a275 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/src/setupTests.ts @@ -0,0 +1,5 @@ +// jest-dom adds custom jest matchers for asserting on DOM nodes. +// allows you to do things like: +// expect(element).toHaveTextContent(/react/i) +// learn more: https://github.com/testing-library/jest-dom +import '@testing-library/jest-dom/extend-expect'; diff --git a/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/tsconfig.json b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/tsconfig.json new file mode 100644 index 00000000..90535355 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/_vendor/beagle-react/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "allowJs": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "isolatedModules": true, + "jsx": "react", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "module": "esnext", + "moduleResolution": "node", + "noEmit": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "es5" + }, + "include": [ + "src" + ] +} diff --git a/beagle/generate/scaffold/src/formula/web-generator/web.sh b/beagle/generate/scaffold/src/formula/web-generator/web.sh new file mode 100644 index 00000000..93e9ef35 --- /dev/null +++ b/beagle/generate/scaffold/src/formula/web-generator/web.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +runWeb() { + slug=$1 + beagle_version=$2 + framework=$3 + + mkdir "$CURRENT_PWD"/"$slug" + + if [[ $framework == "react" ]]; then + cp -r formula/web-generator/_vendor/beagle-react/* "$CURRENT_PWD"/"$slug" + + cd "$CURRENT_PWD"/"$slug" || exit + else + cp -r formula/web-generator/_vendor/beagle-angular/* "$CURRENT_PWD"/"$slug" + + cd "$CURRENT_PWD"/"$slug" || exit + fi + + sed -i -e "s,\${project_name},$slug," package.json + sed -i -e "s,\${beagle_version},$beagle_version," package.json + + if [[ $DOCKER_EXECUTION ]]; then + chown 1000:1000 -R "$CURRENT_PWD"/"$slug" + fi +} diff --git a/beagle/generate/scaffold/src/main.sh b/beagle/generate/scaffold/src/main.sh new file mode 100755 index 00000000..48c8d1ab --- /dev/null +++ b/beagle/generate/scaffold/src/main.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# shellcheck source=/dev/null +. "$(dirname "$0")"/formula/formula.sh --source-only + +runFormula diff --git a/beagle/help.json b/beagle/help.json new file mode 100755 index 00000000..d00f6d8f --- /dev/null +++ b/beagle/help.json @@ -0,0 +1,4 @@ +{ + "long": "Beagle commands", + "short": "Beagle commands" +} diff --git a/beagle/help.txt b/beagle/help.txt new file mode 100644 index 00000000..8a477523 --- /dev/null +++ b/beagle/help.txt @@ -0,0 +1 @@ +Beagle commands