@lvce-editor/opener-worker 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1082,19 +1082,21 @@ const openNew = async url => {
1082
1082
  await invoke$1('OpenExternal.openExternal', url);
1083
1083
  };
1084
1084
 
1085
- let enabled = false;
1086
- let text = '';
1085
+ const state = {
1086
+ enabled: false,
1087
+ text: ''
1088
+ };
1087
1089
  const set = value => {
1088
- enabled = value;
1090
+ state.enabled = value;
1089
1091
  };
1090
1092
  const get = () => {
1091
- return enabled;
1093
+ return state.enabled;
1092
1094
  };
1093
1095
  const writeUrl = value => {
1094
- text = value;
1096
+ state.text = value;
1095
1097
  };
1096
1098
  const readUrl = () => {
1097
- return text;
1099
+ return state.text;
1098
1100
  };
1099
1101
 
1100
1102
  const invoke = async (method, ...params) => {
@@ -1154,16 +1156,18 @@ const getWorkspaceUri = async () => {
1154
1156
  return invoke$2('Workspace.getUri');
1155
1157
  };
1156
1158
 
1157
- let saveDialogMockReturnValue = null;
1159
+ const saveDialogMock = {
1160
+ returnValue: null
1161
+ };
1158
1162
  const registerSaveDialogMock = value => {
1159
- saveDialogMockReturnValue = value;
1163
+ saveDialogMock.returnValue = value;
1160
1164
  };
1161
1165
  const clearSaveDialogMock = () => {
1162
- saveDialogMockReturnValue = null;
1166
+ saveDialogMock.returnValue = null;
1163
1167
  };
1164
1168
  const showSaveDialog = async (title, properties, platform) => {
1165
- if (saveDialogMockReturnValue !== null) {
1166
- return saveDialogMockReturnValue;
1169
+ if (saveDialogMock.returnValue !== null) {
1170
+ return saveDialogMock.returnValue;
1167
1171
  }
1168
1172
  if (platform === Electron) {
1169
1173
  return invoke$1('ElectronDialog.showSaveDialog', title, properties);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/opener-worker",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Opener Worker",
5
5
  "repository": {
6
6
  "type": "git",