Skip to content

Commit 4e4d476

Browse files
committed
Release 2.4.4
1 parent 03d7205 commit 4e4d476

File tree

525 files changed

+77140
-20327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

525 files changed

+77140
-20327
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ target
1414
**/.settings
1515
**/.settings/*
1616
release.properties
17-
release-info
1817
**/pom.xml.releaseBackup
1918
*.hold
2019
*.log
@@ -36,7 +35,6 @@ frontend/.DS_Store
3635
frontend/**/.idea
3736
frontend/libs
3837
frontend/src/css/images
39-
frontend/oraclejetconfig.json
4038
frontend/electron-test/NewWDTModelFile.yml
4139
frontend/electron-test/electronTest.log
4240
frontend/electron-test/node_modules/
@@ -66,3 +64,7 @@ hugo/*/.vscode/
6664
hugo/*/.hugo_build.lock
6765

6866
*start-weblogic.out
67+
68+
# These are side effects of the WKTUI tests
69+
frontend/wktui-tests/node_modules/**
70+
weblogic-toolkit-ui/

THIRD_PARTY_LICENSES.txt

Lines changed: 1319 additions & 788 deletions
Large diffs are not rendered by default.

assembly/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<parent>
1010
<artifactId>console-backend</artifactId>
1111
<groupId>com.oracle.weblogic</groupId>
12-
<version>2.4.2</version>
12+
<version>2.4.4</version>
1313
</parent>
1414

1515
<packaging>pom</packaging>

build-electron.sh

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
#!/bin/bash
2+
do_docker_pull() {
3+
for i in 1 2 3
4+
do
5+
if docker pull $1
6+
then
7+
return 0
8+
fi
9+
sleep $(($i * 30))
10+
done
11+
exit 1
12+
}
13+
214
set -e
315
doit_docker() {
416
mkdir -p $tmp
@@ -25,14 +37,16 @@ export ALREADY_IN_DOCKER=true
2537
rm -rf /build.in/electron/dist
2638
cp -rp electron/dist /build.in/electron
2739
!
40+
ELECTRON_BUILDER_IMAGE=${ELECTRON_BUILDER_IMAGE:-electronuserland/builder:12}
41+
do_docker_pull $ELECTRON_BUILDER_IMAGE
2842
chmod a+x $tmp/script
2943
docker run \
3044
--network=host \
3145
--name electron-build.$$ \
3246
--mount type=bind,source="$PWD",destination=/build.in \
3347
--mount type=bind,source="$tmp/script",destination=/tmp/script,ro \
3448
--entrypoint=/tmp/script \
35-
${ELECTRON_BUILDER_IMAGE:-electronuserland/builder:12}
49+
$ELECTRON_BUILDER_IMAGE
3650
}
3751

3852
# If we're running inside docker, copy the output out at the end
@@ -128,32 +142,50 @@ darwin)
128142
esac
129143
mkdir -p "$extra"
130144

145+
if [ "$os" = windows ]
146+
then
147+
extra_modules=",jdk.crypto.mscapi"
148+
fi
149+
131150
# Make a Custom JRE (if we had modules, we could do more, but this is fine)
132-
jlink --output "$extra"/customjre --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.desktop,java.logging,java.management,java.naming,java.sql,java.xml,jdk.unsupported
151+
jlink --output "$extra"/customjre --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.desktop,java.logging,java.management,java.naming,java.sql,java.xml,jdk.unsupported$extra_modules
133152

134153
mkdir -p "$extra"/backend
135154
cp -rp ../runnable/* "$extra"/backend
136155
cp -p package.json "$extra"
156+
if [ "$1" = internal ]
157+
then
158+
shift
159+
cp -p internal-feed-url.json "$extra/feed-url.json"
160+
fi
137161

138162
npm run dist "$@"
139163

140164
case "$os" in
141165
darwin)
142-
# Create a second copy of the executable for use by WKT UI, so that Mac OS thinks
143-
# that they are two separate programs and let's you run them.
144-
cd dist/mac
145-
cp -p "WebLogic Remote Console.app/Contents/MacOS/WebLogic Remote Console" "WebLogic Remote Console.app/Contents/MacOS/Embeddable Remote Console"
146-
zip ../*.zip "WebLogic Remote Console.app/Contents/MacOS/Embeddable Remote Console"
147-
cd ../..
166+
for mac_dir in dist/mac*
167+
do
168+
mac_suffix=${mac_dir#dist/mac}
169+
# Create a second copy of the executable for use by WKT UI, so that Mac OS thinks
170+
# that they are two separate programs and let's you run them.
171+
cd $mac_dir
172+
cp -p "WebLogic Remote Console.app/Contents/MacOS/WebLogic Remote Console" "WebLogic Remote Console.app/Contents/MacOS/Embeddable Remote Console"
173+
zip ../*.zip "WebLogic Remote Console.app/Contents/MacOS/Embeddable Remote Console"
174+
cd ../..
175+
done
148176
esac
149177

150178
if set | grep -q CODESIGNBUREAU
151179
then
152180
case "$os" in
153181
darwin)
154-
./signMac dist/mac/"WebLogic Remote Console.app" signed/mac/"WebLogic Remote Console.app"
155-
# Regenerate using the signed version
156-
"$(npm bin)/electron-builder" -p never --pd="signed/mac/WebLogic Remote Console.app"
182+
for mac_dir in dist/mac*
183+
do
184+
mac_suffix=${mac_dir#dist/mac}
185+
./signMac $mac_dir/"WebLogic Remote Console.app" signed/mac${mac_suffix}/"WebLogic Remote Console.app"
186+
# Regenerate using the signed version
187+
"$(npm bin)/electron-builder" -p never --pd="signed/mac${mac_suffix}/WebLogic Remote Console.app"
188+
done
157189
;;
158190
windows)
159191
rm -rf "$tmp"/*

build-tools/checkstyle-8.36-all.jar

-12.3 MB
Binary file not shown.

build-tools/checkstyle.sh

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
11
#!/bin/bash
22

3-
# Copyright 2020, Oracle Corporation and/or its affiliates. All rights reserved.
3+
# Copyright 2020, 2023, Oracle Corporation and/or its affiliates. All rights reserved.
44
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
55

6+
set -e
7+
68
mydir=$PWD
9+
CHECKSTYLE_JAR="$mydir/target/checkstyle.jar"
10+
# DOWNLOAD_CHECKSTYLE_URL=${DOWNLOAD_CHECKSTYLE_URL:-https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.10.0/checkstyle-10.10.0-all.jar}
11+
DOWNLOAD_CHECKSTYLE_URL=${DOWNLOAD_CHECKSTYLE_URL:-https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.36/checkstyle-8.36-all.jar}
12+
if ! unzip -v "$CHECKSTYLE_JAR" > /dev/null 2>&1
13+
then
14+
mkdir -p "${CHECKSTYLE_JAR%/*}"
15+
if ! curl -s -L -o "$CHECKSTYLE_JAR" ${DOWNLOAD_CHECKSTYLE_URL}
16+
then
17+
echo Cannot download checkstyle, exiting >&2
18+
exit 1
19+
fi
20+
fi
21+
22+
tmp="/tmp/checkstyle.out"
23+
rm -f "$tmp"
24+
725
cd ..
8-
if find $mydir -name '*.java' | xargs java -jar build-tools/checkstyle-8.36-all.jar -c=build-tools/src/main/resources/checkstyle/customized_google_checks.xml | grep WARN
26+
if ! java -jar "$CHECKSTYLE_JAR" -c=build-tools/src/main/resources/checkstyle/customized_google_checks.xml $(find "$mydir" -name '*.java') > $tmp 2>&1 || grep -q WARN "$tmp"
927
then
28+
cat $tmp
1029
exit 1
1130
fi

build-tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.oracle.weblogic.console-backend</groupId>
88
<artifactId>build-tools</artifactId>
9-
<version>2.4.2</version>
9+
<version>2.4.4</version>
1010
<name>Build Tools</name>
1111

1212
<properties>

electron/app/js/auto-prefs-json.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2022, Oracle and/or its affiliates.
3+
* Copyright (c) 2022, 2023, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
* @ignore
66
*/
@@ -89,6 +89,9 @@ const AutoPrefs = (() => {
8989
clear: () => {
9090
_fields = {};
9191
},
92+
getPath: (userDataPath) => {
93+
return `${userDataPath}/auto-prefs.json`;
94+
},
9295
/**
9396
* Populates the in-memory data that ``AutoPrefs`` knows about, by reading and parsing the JSON content in the ``auto-prefs.json`` file.
9497
* <p>If the <code>userDataPath</code> argument was passed, it's used as the path to the <code>auto-prefs.json</code> file. Otherwise, a check is done to see if a <code>userDataPath</code> in-memory field has been set. If so, then the value assigned to that field is used used as the path to the <code>auto-prefs.json</code> file.</p>
@@ -101,7 +104,7 @@ const AutoPrefs = (() => {
101104
// function argument, regardless.
102105
_appPaths.userDataPath = userDataPath;
103106
// Construct full path to auto-prefs.json file
104-
const filepath = `${userDataPath}/auto-prefs.json`;
107+
const filepath = AutoPrefs.getPath(userDataPath);
105108
if (fs.existsSync(filepath)) {
106109
try {
107110
const props = JSON.parse(fs.readFileSync(filepath));

electron/app/js/auto-update-utils.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2022, Oracle and/or its affiliates.
3+
* Copyright (c) 2023, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
* @ignore
66
*/
@@ -13,21 +13,27 @@ let _updateInfo;
1313

1414
(() => {
1515
autoUpdater.autoDownload = false;
16+
autoUpdater.allowDowngrade = false;
1617
})();
1718

1819
autoUpdater.on('update-available', (info) => {
1920
_updateInfo = info;
2021
});
2122

2223
async function checkForUpdates() {
23-
return Promise.resolve(getAutoUpdateInfo());
24+
return Promise.resolve(autoUpdater.checkForUpdates());
2425
}
2526

26-
function getAutoUpdateInfo() {
27-
return (typeof _updateInfo === 'undefined' ? {version: autoUpdater.currentVersion.version} : _updateInfo);
27+
function getVersion() {
28+
return _updateInfo.version;
29+
}
30+
31+
function setFeedURL(feedURL) {
32+
autoUpdater.setFeedURL(feedURL);
2833
}
2934

3035
module.exports = {
31-
getAutoUpdateInfo,
36+
getVersion,
37+
setFeedURL,
3238
checkForUpdates
33-
};
39+
};

electron/app/js/config-json.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/**
1111
* See {@link https://stackabuse.com/javascripts-immediately-invoked-function-expressions/}
12-
* @type {{getFilename, getAll, set, read, get, initialize, write}}
12+
* @type {{getPath, getAll, set, read, get, initialize, write}}
1313
*/
1414
const AppConfig = (() => {
1515
const fs = require('fs');
@@ -32,7 +32,7 @@ const AppConfig = (() => {
3232
_config['persistenceDirectory'] = options.appPaths.userData;
3333
AppConfig.read();
3434
},
35-
getFilename: () => {
35+
getPath: () => {
3636
return `${_appPaths.userDataPath}/config.json`;
3737
},
3838
getAll: () => {
@@ -48,9 +48,9 @@ const AppConfig = (() => {
4848
if (settings.executablePath) _config['executableJar'] = `${_appPaths.exe}/${settings.executablePath}`;
4949
},
5050
read: () => {
51-
if (fs.existsSync(AppConfig.getFilename())) {
51+
if (fs.existsSync(AppConfig.getPath())) {
5252
try {
53-
const settings = JSON.parse(fs.readFileSync(AppConfig.getFilename()).toString());
53+
const settings = JSON.parse(fs.readFileSync(AppConfig.getPath()).toString());
5454
AppConfig.set(settings);
5555
}
5656
catch(err) {
@@ -60,7 +60,7 @@ const AppConfig = (() => {
6060
},
6161
write: () => {
6262
// Creates the file, if it doesn't exists
63-
fs.writeFileSync(AppConfig.getFilename(), JSON.stringify(_config, null, 4));
63+
fs.writeFileSync(AppConfig.getPath(), JSON.stringify(_config, null, 4));
6464
}
6565
};
6666

0 commit comments

Comments
 (0)