Skip to content

Commit 1f7f11b

Browse files
authored
Merge pull request #71 from oracle/release-2.4.12
Release 2.4.12
2 parents 21f9fee + 0e77046 commit 1f7f11b

File tree

420 files changed

+28580
-9124
lines changed

Some content is hidden

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

420 files changed

+28580
-9124
lines changed

THIRD_PARTY_LICENSES.txt

+253-231
Large diffs are not rendered by default.

assembly/pom.xml

+1-1
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.11</version>
12+
<version>2.4.12</version>
1313
</parent>
1414

1515
<packaging>pom</packaging>

build-tools/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

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

1212
<parent>
1313
<groupId>com.oracle.weblogic</groupId>
1414
<artifactId>console-backend</artifactId>
15-
<version>2.4.11</version>
15+
<version>2.4.12</version>
1616
</parent>
1717

1818
<properties>

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

+30-24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates.
3+
* Copyright (c) 2022, 2024, 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
*/
@@ -107,30 +107,36 @@ const AutoPrefs = (() => {
107107
const filepath = AutoPrefs.getPath(userDataPath);
108108
if (fs.existsSync(filepath)) {
109109
try {
110-
const props = JSON.parse(fs.readFileSync(filepath));
111-
// Update all the other _fields with values from the
112-
// file just read.
113-
AutoPrefs.set(props);
114-
// See if auto-prefs.json contained a projects field
115-
if (typeof props.projects !== 'undefined') {
116-
// It did, so use it to do a UserProjects.putAll()
117-
UserProjects.putAll(props.projects);
118-
// Use UserProjects.write() to write out the
119-
// in-memory projects.
120-
UserProjects.write(userDataPath);
121-
}
122-
// See if auto-prefs.json contained a preferences field
123-
if (typeof props.preferences !== 'undefined') {
124-
// It did, so use it to do a UserPrefs.putAll()
125-
UserPrefs.putAll(props.preferences);
126-
// Use UserPrefs.write() to write out the
127-
// in-memory preferences.
128-
UserPrefs.write(userDataPath);
110+
const fileContents = fs.readFileSync(filepath);
111+
112+
if (fileContents !== this.previousContents) {
113+
const props = JSON.parse(fileContents);
114+
// Update all the other _fields with values from the
115+
// file just read.
116+
AutoPrefs.set(props);
117+
// See if auto-prefs.json contained a projects field
118+
if (typeof props.projects !== 'undefined') {
119+
// It did, so use it to do a UserProjects.putAll()
120+
UserProjects.putAll(props.projects);
121+
// Use UserProjects.write() to write out the
122+
// in-memory projects.
123+
UserProjects.write(userDataPath);
124+
}
125+
// See if auto-prefs.json contained a preferences field
126+
if (typeof props.preferences !== 'undefined') {
127+
// It did, so use it to do a UserPrefs.putAll()
128+
UserPrefs.putAll(props.preferences);
129+
// Use UserPrefs.write() to write out the
130+
// in-memory preferences.
131+
UserPrefs.write(userDataPath);
132+
}
133+
// The auto-prefs.json field could have contained a
134+
// projects or preferences field, which will not be
135+
// in the _fields. Write out the updated _fields.
136+
AutoPrefs.write(userDataPath);
137+
138+
this.previousContents = fileContents;
129139
}
130-
// The auto-prefs.json field could have contained a
131-
// projects or preferences field, which will not be
132-
// in the _fields. Write out the updated _fields.
133-
AutoPrefs.write(userDataPath);
134140
}
135141
catch(err) {
136142
log('error', err);

electron/app/js/config-json.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates.
3+
* Copyright (c) 2022, 2024, 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
*/
@@ -50,8 +50,13 @@ const AppConfig = (() => {
5050
read: () => {
5151
if (fs.existsSync(AppConfig.getPath())) {
5252
try {
53-
const settings = JSON.parse(fs.readFileSync(AppConfig.getPath()).toString());
54-
AppConfig.set(settings);
53+
const content = fs.readFileSync(AppConfig.getPath()).toString();
54+
55+
if (content !== this.previousContent) {
56+
this.previousContent = content;
57+
const settings = JSON.parse(content);
58+
AppConfig.set(settings);
59+
}
5560
}
5661
catch(err) {
5762
log('error', err);

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

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates.
3+
* Copyright (c) 2022, 2024, 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
*/
@@ -12,6 +12,7 @@ const OSUtils = require('./os-utils');
1212
const I18NUtils = require('./i18n-utils');
1313
const ElectronPreferences = require('electron-preferences');
1414
const SettingsEditor = require('./settings-editor');
15+
const fs = require('fs');
1516

1617
/**
1718
* See {@link https://stackabuse.com/javascripts-immediately-invoked-function-expressions/}
@@ -20,6 +21,8 @@ const SettingsEditor = require('./settings-editor');
2021
const UserPrefs = (() => {
2122
let preferences;
2223

24+
const dataStore = 'user-prefs.json';
25+
2326
function osBasedHelp() {
2427
if (OSUtils.isMacOS())
2528
return I18NUtils.get('wrc-electron.menus.preferences.section.credential-storage.confirmation.apple.help');
@@ -32,7 +35,7 @@ const UserPrefs = (() => {
3235
// along with useful JSDoc comments :-).
3336
return {
3437
getPath: (userDataPath) => {
35-
return `${userDataPath}/user-prefs.json`;
38+
return `${userDataPath}/${dataStore}`;
3639
},
3740
get: (key) => {
3841
if (!preferences) {
@@ -46,6 +49,7 @@ const UserPrefs = (() => {
4649
SettingsEditor.destroy(preferences);
4750
// We need to create a fresh one to re-initialize various
4851
// objects for show()
52+
this.previousContent = null;
4953
UserPrefs.init();
5054
preferences.show();
5155
},
@@ -152,10 +156,19 @@ const UserPrefs = (() => {
152156
}
153157
]
154158
};
159+
155160
preferences = new ElectronPreferences(preferencesTemplate);
156161
},
157162
read: (userDataPath) => {
158-
UserPrefs.init();
163+
// Ensure that there are file content changes instead of relying on file metadata (e.g. fstat)
164+
// Workaround for https://github.com/paulmillr/chokidar/issues/1345
165+
const data = fs.readFileSync(UserPrefs.getPath(userDataPath), { encoding: 'utf8', flag: 'r' });
166+
167+
if (data != this.previousContent) {
168+
UserPrefs.init();
169+
170+
this.previousContent = data;
171+
}
159172
}
160173
};
161174

electron/app/main.js

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ const AppWindow = require('./js/window-management');
4747
const instDir = path.dirname(app.getPath('exe'));
4848
const { homepage, productName, version, copyright } = require(`${instDir}/package.json`);
4949

50+
if (OSUtils.isMacOS()) {
51+
app.disableHardwareAcceleration();
52+
}
53+
5054
let feedURL;
5155

5256
// The documentation says to not use setFeedURL(), though it seems to work.

0 commit comments

Comments
 (0)