Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .run-cli-on-save
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Config]
WorkingDir={SolutionDir}
Debug=true

[PostSave]
Commands=cmd={SolutionDir}/Scripts/RunDprint.vbs args={File}
IncludeExtensions=.tsx|.ts|.js
70 changes: 0 additions & 70 deletions CreateInstallerLinux.bat

This file was deleted.

88 changes: 0 additions & 88 deletions CreateInstallerOSX.bat

This file was deleted.

2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Product>SQL Schema Compare</Product>
<Description>https://github.com/TiCodeX/SQLSchemaCompare</Description>
<Authors>TiCodeX</Authors>
<Version>2026.7.1</Version>
<Version>2026.8.1</Version>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
4 changes: 2 additions & 2 deletions SQLSchemaCompare.CLI/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,14 @@
"Microsoft.EntityFrameworkCore.SqlServer": "[10.0.10, )",
"Microting.EntityFrameworkCore.MySql": "[10.0.10, )",
"Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, )",
"TiCodeX.SQLSchemaCompare.Services": "[2026.7.1, )"
"TiCodeX.SQLSchemaCompare.Services": "[2026.8.1, )"
}
},
"TiCodeX.SQLSchemaCompare.Services": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[10.0.10, )",
"TiCodeX.SQLSchemaCompare.Core": "[2026.7.1, )"
"TiCodeX.SQLSchemaCompare.Core": "[2026.8.1, )"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion SQLSchemaCompare.Core/SQLSchemaCompare.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition=" '$(OS)' == 'Windows_NT' ">
<Exec Command="mkdir $(ProjectDir)..\.git\hooks" IgnoreExitCode="true" />
<Exec Command="copy $(ProjectDir)..\pre-commit-hook.sh $(ProjectDir)..\.git\hooks\pre-commit" />
<Exec Command="copy $(ProjectDir)..\Scripts\pre-commit-hook.sh $(ProjectDir)..\.git\hooks\pre-commit" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion SQLSchemaCompare.Infrastructure/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[10.0.10, )",
"TiCodeX.SQLSchemaCompare.Core": "[2026.7.1, )"
"TiCodeX.SQLSchemaCompare.Core": "[2026.8.1, )"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions SQLSchemaCompare.Test/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,14 +622,14 @@
"Microsoft.EntityFrameworkCore.SqlServer": "[10.0.10, )",
"Microting.EntityFrameworkCore.MySql": "[10.0.10, )",
"Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, )",
"TiCodeX.SQLSchemaCompare.Services": "[2026.7.1, )"
"TiCodeX.SQLSchemaCompare.Services": "[2026.8.1, )"
}
},
"TiCodeX.SQLSchemaCompare.Services": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[10.0.10, )",
"TiCodeX.SQLSchemaCompare.Core": "[2026.7.1, )"
"TiCodeX.SQLSchemaCompare.Core": "[2026.8.1, )"
}
}
},
Expand Down
20 changes: 17 additions & 3 deletions SQLSchemaCompare.UI/Pages/_ScriptSetup.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,27 @@
@* Monaco uses a custom amd loader that overrides node's require. *@
@* Keep a reference to node's require (if exists) so we can restore it after executing the amd loader file. *@
<script type="text/javascript">
var nodeRequire = typeof require !== "undefined" ? require : null;
window.tempNode = {
require: window.require,
module: window.module,
exports: window.exports,
process: window.process
};

delete window.require;
delete window.module;
delete window.exports;
delete window.process;
</script>
<script src="~/lib/monaco-editor/vs/loader.js"></script>
<script src="~/lib/monaco-editor/min/vs/loader.js"></script>
@* Save Monaco's amd require and restore Node's require (or undefined if doesn't exist) *@
<script type="text/javascript">
var amdRequire = require;
require = nodeRequire !== null ? nodeRequire : undefined;
window.require = window.tempNode.require;
window.module = window.tempNode.module;
window.exports = window.tempNode.exports;
window.process = window.tempNode.process;
delete window.tempNode;
</script>

@* SQLSchemaCompare scripts *@
Expand Down
4 changes: 2 additions & 2 deletions SQLSchemaCompare.UI/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,13 @@
"Microsoft.EntityFrameworkCore.SqlServer": "[10.0.10, )",
"Microting.EntityFrameworkCore.MySql": "[10.0.10, )",
"Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, )",
"TiCodeX.SQLSchemaCompare.Services": "[2026.7.1, )"
"TiCodeX.SQLSchemaCompare.Services": "[2026.8.1, )"
}
},
"TiCodeX.SQLSchemaCompare.Services": {
"type": "Project",
"dependencies": {
"TiCodeX.SQLSchemaCompare.Core": "[2026.7.1, )"
"TiCodeX.SQLSchemaCompare.Core": "[2026.8.1, )"
}
}
},
Expand Down
4 changes: 0 additions & 4 deletions SQLSchemaCompare.UI/wwwroot/css/Index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ $fa-font-size-base: $font-size-base;
}
}
}

.monaco-editor.vs {
max-height: 0px; // Fix autoresize on focus
}
/*#endregion*/

/*#region Toolbar */
Expand Down
2 changes: 1 addition & 1 deletion SQLSchemaCompare.UI/wwwroot/js/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $(() => {
void Utility.ApplicationStartup().then(() => {
// Configure the monaco editor loader
amdRequire.config({
baseUrl: "lib/monaco-editor",
baseUrl: "lib/monaco-editor/min",
});

// Preload the monaco-editor
Expand Down
30 changes: 20 additions & 10 deletions SQLSchemaCompare.UI/wwwroot/js/Managers/EditorManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class EditorManager {
links: false,
contextmenu: false,
quickSuggestions: false,
autoClosingBrackets: false,
autoClosingBrackets: "never",
lineNumbers: "on",
selectionHighlight: false,
occurrencesHighlight: false,
occurrencesHighlight: "off",
folding: false,
minimap: {
enabled: false,
},
matchBrackets: false,
matchBrackets: "never",
scrollbar: {
vertical: "visible",
},
Expand Down Expand Up @@ -57,9 +57,18 @@ class EditorManager {
// And clear the old instances
this.ClearOldInstances();

const editor: monaco.editor.IStandaloneCodeEditor | monaco.editor.IStandaloneDiffEditor = type === EditorType.Normal ?
monaco.editor.create(domElement.get(0), this.defaultOptions) :
monaco.editor.createDiffEditor(domElement.get(0), this.defaultOptionsDiff);
const innerEditorId = domElementId + "_inner";
domElement.append(`<div id="${innerEditorId}" style="width: 100%; height: 100%;"></div>`);
const innerEditor = document.getElementById(innerEditorId);

let editor: monaco.editor.IStandaloneCodeEditor | monaco.editor.IStandaloneDiffEditor;
if (type === EditorType.Normal) {
editor = monaco.editor.create(innerEditor!, this.defaultOptions);
editor.setModel(model as monaco.editor.ITextModel);
} else {
editor = monaco.editor.createDiffEditor(innerEditor!, this.defaultOptionsDiff);
editor.setModel(model as monaco.editor.IDiffEditorModel);
}

$(`#${domElementId}`).attr("editorId", editor.getId());

Expand All @@ -68,8 +77,6 @@ class EditorManager {
// Disable the command palette
editor.addCommand(monaco.KeyCode.F1, (): void => {/* Do nothing */}, "");

editor.setModel(model);

// Register context menu
$(`#${domElementId} .monaco-editor .monaco-scrollable-element`).on("contextmenu", (event: JQuery.Event) => {
let currentEditor: monaco.editor.IStandaloneCodeEditor;
Expand All @@ -86,14 +93,17 @@ class EditorManager {
label: Localization.Get("MenuCopy"),
accelerator: "CmdOrCtrl+C",
click: () => {
electronRemote.clipboard.writeText(currentEditor.getModel().getValueInRange(currentEditor.getSelection()));
const selection = currentEditor.getSelection();
if (selection && !selection.isEmpty()) {
electronRemote.clipboard.writeText(currentEditor.getModel()?.getValueInRange(selection) ?? "");
}
},
},
{
label: Localization.Get("MenuSelectAll"),
accelerator: "CmdOrCtrl+A",
click: () => {
currentEditor.setSelection(currentEditor.getModel().getFullModelRange());
currentEditor.setSelection(currentEditor.getModel()?.getFullModelRange() ?? new monaco.Range(1, 1, 1, 1));
},
},
{
Expand Down
Loading
Loading