Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into spring-ai-service-c…
Browse files Browse the repository at this point in the history
…onnection
  • Loading branch information
eddumelendez committed Sep 4, 2024
2 parents b1aec73 + d2b676d commit 4ff4b01
Show file tree
Hide file tree
Showing 121 changed files with 3,262 additions and 1,910 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: ./mvnw --batch-mode --update-snapshots verify

- name: Set up Azure
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # v2.1.1
with:
creds: ${{ secrets.AZURE_CREDENTIALS_SPRING_IO }}

Expand Down
5 changes: 3 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.1
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
2 changes: 1 addition & 1 deletion CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ added after the original pull request but before a merge.

=== Building from Source
start.spring.io can be build from the command line using
https://maven.apache.org/run-maven/index.html[Apache Maven] on JDK 11 or above.
https://maven.apache.org/run-maven/index.html[Apache Maven] on JDK 17 or above.
We include '`Maven Wrapper`' scripts (`./mvnw` or `mvnw.bat`) that you can run rather
than needing to install Maven locally.

Expand Down
17 changes: 13 additions & 4 deletions mvnw
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.1
# Apache Maven Wrapper startup batch script, version 3.3.2
#
# Optional ENV vars
# -----------------
Expand Down Expand Up @@ -97,11 +97,19 @@ die() {
exit 1
}

trim() {
# MWRAPPER-139:
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
# Needed for removing poorly interpreted newline sequences when running in more
# exotic environments such as mingw bash on Windows.
printf "%s" "${1}" | tr -d '[:space:]'
}

# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
while IFS="=" read -r key value; do
case "${key-}" in
distributionUrl) distributionUrl="${value-}" ;;
distributionSha256Sum) distributionSha256Sum="${value-}" ;;
distributionUrl) distributionUrl=$(trim "${value-}") ;;
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
esac
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
Expand Down Expand Up @@ -131,7 +139,8 @@ esac
distributionUrlName="${distributionUrl##*/}"
distributionUrlNameMain="${distributionUrlName%.*}"
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
MAVEN_HOME="$HOME/.m2/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"

exec_maven() {
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
Expand Down
5 changes: 4 additions & 1 deletion mvnw.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Apache Maven Wrapper startup batch script, version 3.3.1
@REM Apache Maven Wrapper startup batch script, version 3.3.2
@REM
@REM Optional ENV vars
@REM MVNW_REPOURL - repo url base for downloading maven distribution
Expand Down Expand Up @@ -79,6 +79,9 @@ if ($env:MVNW_REPOURL) {
$distributionUrlName = $distributionUrl -replace '^.*/',''
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
if ($env:MAVEN_USER_HOME) {
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
}
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"

Expand Down
18 changes: 12 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.6</version>
<version>3.3.3</version>
</parent>
<groupId>io.spring.start</groupId>
<artifactId>start-parent</artifactId>
Expand All @@ -33,13 +33,14 @@
<properties>
<revision>0.0.1-SNAPSHOT</revision>
<disable.checks>false</disable.checks>
<spring-initializr.version>0.21.0-SNAPSHOT</spring-initializr.version>
<spring-javaformat.version>0.0.41</spring-javaformat.version>
<spring-initializr.version>0.22.0-SNAPSHOT</spring-initializr.version>
<spring-javaformat.version>0.0.43</spring-javaformat.version>
</properties>

<modules>
<module>start-client</module>
<module>start-site</module>
<module>test-support</module>
</modules>

<profiles>
Expand Down Expand Up @@ -79,10 +80,15 @@
<artifactId>start-site</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>io.spring.start</groupId>
<artifactId>test-support</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-dependencies</artifactId>
<version>5.8.0</version>
<version>5.13.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -116,7 +122,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<executions>
<execution>
<id>checkstyle-validation</id>
Expand All @@ -135,7 +141,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.12.7</version>
<version>10.17.0</version>
</dependency>
<dependency>
<groupId>io.spring.javaformat</groupId>
Expand Down
1 change: 1 addition & 0 deletions start-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"js-search": "^2.0.0",
"jszip": "^3.6.0",
"lodash": "^4.17.21",
"luxon": "^3.4.4",
"prism-react-renderer": "^1.2.0",
"prismjs": "^1.24.0",
"prop-types": "^15.7.2",
Expand Down
2 changes: 1 addition & 1 deletion start-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</goals>
<configuration>
<nodeVersion>v16.20.0</nodeVersion>
<yarnVersion>v1.22.19</yarnVersion>
<yarnVersion>v1.22.22</yarnVersion>
</configuration>
</execution>
<execution>
Expand Down
20 changes: 19 additions & 1 deletion start-client/src/components/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { getConfig, getInfo, getProject } from './utils/ApiUtils'

const Explore = lazy(() => import('./common/explore/Explore'))
const Share = lazy(() => import('./common/share/Share'))
const History = lazy(() => import('./common/history/History'))
const HotKeys = lazy(() => import('./common/builder/HotKeys'))

export default function Application() {
Expand All @@ -32,6 +33,7 @@ export default function Application() {
theme,
share: shareOpen,
explore: exploreOpen,
history: historyOpen,
list,
dependencies,
} = useContext(AppContext)
Expand Down Expand Up @@ -78,6 +80,7 @@ export default function Application() {
setGenerating(false)
if (project) {
FileSaver.saveAs(project, `${get(values, 'meta.artifact')}.zip`)
dispatch({ type: 'ADD_HISTORY', payload: share })
}
}

Expand All @@ -102,7 +105,13 @@ export default function Application() {
setBlob(null)
dispatch({
type: 'UPDATE',
payload: { list: false, share: false, explore: false, nav: false },
payload: {
list: false,
share: false,
explore: false,
nav: false,
history: false,
},
})
}

Expand Down Expand Up @@ -163,6 +172,15 @@ export default function Application() {
onClose={onEscape}
/>
</Suspense>
<Suspense fallback=''>
<History open={historyOpen || false} onClose={onEscape} />
<Explore
projectName={`${get(values, 'meta.artifact')}.zip`}
blob={blob}
open={exploreOpen || false}
onClose={onEscape}
/>
</Suspense>
</>
)
}
23 changes: 23 additions & 0 deletions start-client/src/components/common/history/History.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import '../../../styles/history.scss'

import PropTypes from 'prop-types'
import React from 'react'

import Modal from './Modal'
import { Overlay } from '../form'

function History({ open, onClose }) {
return (
<>
<Modal open={open || false} onClose={onClose} />
<Overlay open={open || false} />
</>
)
}

History.propTypes = {
open: PropTypes.bool.isRequired,
onClose: PropTypes.func.isRequired,
}

export default History
Loading

0 comments on commit 4ff4b01

Please sign in to comment.