Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
1b8d66b
proof of concept
allancascante Oct 20, 2025
9b9e982
small fix to enable button after success export
allancascante Oct 20, 2025
9d48496
fix on select database by default
allancascante Oct 20, 2025
e79fedc
fix on connecting when lunching from database
allancascante Oct 20, 2025
f2b99dd
small fixes in ui
allancascante Oct 21, 2025
68f0924
making app and version optional
allancascante Oct 21, 2025
9ca59e4
small text change
allancascante Oct 21, 2025
d726761
loc changes
allancascante Oct 21, 2025
ad3ce87
Update src/reactviews/pages/DataTierApplication/dataTierApplicationFo…
allancascante Oct 21, 2025
03f5260
Update src/controllers/dataTierApplicationWebviewController.ts
allancascante Oct 21, 2025
3914a99
fix on validation
allancascante Oct 21, 2025
ab77938
fixing test failing in pipeline
allancascante Oct 21, 2025
fa3e245
small improvement in validation
allancascante Oct 23, 2025
b74be0c
clearing form after succesfully completing the operation
allancascante Oct 23, 2025
c1ce2c4
removing messages panel
allancascante Oct 23, 2025
21ac90a
removing message panel
allancascante Oct 23, 2025
ea0ee8e
changes on operation component
allancascante Oct 23, 2025
35e4398
missing localization changes
allancascante Oct 23, 2025
fcd13a7
Merge branch 'main' into dev/allancascante/data-tier-application
allancascante Oct 23, 2025
8ec36a3
localization after merge
allancascante Oct 23, 2025
f219588
refactor to move logic to controller
allancascante Oct 23, 2025
b2fad95
fix to clear databases when selected an non-active server
allancascante Oct 23, 2025
7ee8fd7
fixes in connection management
allancascante Oct 24, 2025
a9c794c
updates to localization
allancascante Oct 24, 2025
6056efd
unit tests updates
allancascante Oct 24, 2025
df8fc7a
adding telemetry and aria-label to form
allancascante Oct 27, 2025
f0b6a2a
updating test
allancascante Oct 27, 2025
5e59d0c
adding extra tests
allancascante Oct 27, 2025
96ba664
Merge branch 'main' into dev/allancascante/data-tier-application
allancascante Oct 31, 2025
390ef10
adding support to suggest names
allancascante Nov 1, 2025
655f146
database name suggestions
allancascante Nov 1, 2025
60744d1
adding localization and spinner
allancascante Nov 3, 2025
6c86f32
style changes to match example from pr
allancascante Nov 3, 2025
c82bcb2
Merge branch 'main' into dev/allancascante/data-tier-application
allancascante Nov 3, 2025
92d6071
fix on tests
allancascante Nov 3, 2025
b81ec23
small fixes
allancascante Nov 3, 2025
25c78de
renaming the whole functionality to match the service (dacFx) instead…
allancascante Nov 5, 2025
a8671e6
refactor from explicit importing to * per pr request
allancascante Nov 5, 2025
bf2bbd1
breaking the form into pieces per PR comment
allancascante Nov 5, 2025
d743607
refactor to simplify the registration calls using a shared method for…
allancascante Nov 5, 2025
4c7ee57
pr comment to combine imports
allancascante Nov 5, 2025
53cd503
refactor to a base interface per pr comment
allancascante Nov 5, 2025
83bddff
change to expect from assert
allancascante Nov 5, 2025
f071da3
moving require to imports for homdir
allancascante Nov 5, 2025
f8612ab
localization for file dialog label
allancascante Nov 5, 2025
02beea3
localization changes
allancascante Nov 5, 2025
76fa8a0
format changes for timestamp in the filename
allancascante Nov 5, 2025
80ee27b
refactor for getting the name using just one function call as suggest…
allancascante Nov 5, 2025
3102d0d
moved the extensions to constants as requested in pr
allancascante Nov 5, 2025
e0f5b32
simplyfing connection to server logic per PR comment
allancascante Nov 6, 2025
3f7bed7
refactor on how to pull saved connections and connecting to allow get…
allancascante Nov 6, 2025
b0826be
removing tests not needed after refactoring
allancascante Nov 6, 2025
317c470
refactor method
allancascante Nov 6, 2025
2cc5d33
moving styles to the bottom
allancascante Nov 6, 2025
15fa192
changes to use common interface
allancascante Nov 6, 2025
badecf1
removing unit tests per PR request
allancascante Nov 6, 2025
ba9709f
pr changes to have just one function for filename suggestion
allancascante Nov 6, 2025
151404a
rename to use a verb per PR comment
allancascante Nov 6, 2025
1a049b5
refactor to a shared function database validation
allancascante Nov 6, 2025
b5cb330
refactored common logic to a helper function per pr comment
allancascante Nov 6, 2025
fd7d8cb
changes to centralize the rpc
allancascante Nov 6, 2025
5fe5745
rename for the entire functionality
allancascante Nov 6, 2025
cfea503
Merge branch 'main' into dev/allancascante/data-tier-application
allancascante Nov 6, 2025
558740e
reverting lint exclude rule
allancascante Nov 6, 2025
b1d815b
fix for issue #20458
allancascante Nov 6, 2025
166e6ea
fix for bug #20459
allancascante Nov 7, 2025
5b2f6ff
fix for [Bug]: in export and extract interface, DB dropdown should be…
allancascante Nov 7, 2025
988fb18
fix for [Bug]: remove system databases from database dropdown
allancascante Nov 7, 2025
9201634
fix for [Bug]: adding 'learn more' link
allancascante Nov 7, 2025
9f91670
fix bug [Bug]: consistency in operation labels
allancascante Nov 7, 2025
b620e16
fix bug [Bug]: Success message needs to 'reveal in explorer' on export
allancascante Nov 7, 2025
b1a96cd
rename telemetry to match functionality anme and deleting file not ne…
allancascante Nov 7, 2025
c3704c0
rename to dacpac dialog
allancascante Nov 7, 2025
51de7c0
more renames
allancascante Nov 7, 2025
260ab45
more renames
allancascante Nov 7, 2025
b5baa8f
rename comment
allancascante Nov 7, 2025
96c4536
adding missing renames
allancascante Nov 7, 2025
4e2be14
fixing methods passing around connections
allancascante Nov 7, 2025
255fae6
removing code not needed
allancascante Nov 7, 2025
6bf885c
Merge branch 'main' into dev/allancascante/data-tier-application
allancascante Nov 7, 2025
b091124
removing test not needed
allancascante Nov 7, 2025
7ffd313
refactor to use shared function
allancascante Nov 7, 2025
e51bc24
Merge branch 'dev/allancascante/data-tier-application' into dev/allan…
allancascante Nov 7, 2025
d584e7b
fixes after merge
allancascante Nov 7, 2025
1cbf119
use feature flag to hide the dacpac dialog
allancascante Nov 8, 2025
39ba016
Merge branch 'main' into dev/allancascante/dacpac_dialog_fixes
allancascante Nov 8, 2025
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
31 changes: 25 additions & 6 deletions localization/l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -808,14 +808,14 @@
"No connections available. Please create a connection first.": "No connections available. Please create a connection first.",
"Connecting to server...": "Connecting to server...",
"Failed to connect to server": "Failed to connect to server",
"Deploy DACPAC": "Deploy DACPAC",
"Publish DACPAC": "Publish DACPAC",
"Extract DACPAC": "Extract DACPAC",
"Import BACPAC": "Import BACPAC",
"Export BACPAC": "Export BACPAC",
"Deploy a data-tier application .dacpac file to an instance of SQL Server": "Deploy a data-tier application .dacpac file to an instance of SQL Server",
"Extract a data-tier application .dacpac from an instance of SQL Server to a .dacpac file": "Extract a data-tier application .dacpac from an instance of SQL Server to a .dacpac file",
"Create a database from a .bacpac file": "Create a database from a .bacpac file",
"Export the schema and data from a database to the logical .bacpac file format": "Export the schema and data from a database to the logical .bacpac file format",
"Deploy a .dacpac file to a new or existing SQL database": "Deploy a .dacpac file to a new or existing SQL database",
"Extract the schema from a SQL database to a .dacpac file": "Extract the schema from a SQL database to a .dacpac file",
"Import a .bacpac file to a new or empty database": "Import a .bacpac file to a new or empty database",
"Export the schema and data from a SQL database to a .bacpac file": "Export the schema and data from a SQL database to a .bacpac file",
"Package file": "Package file",
"Output file": "Output file",
"Select package file": "Select package file",
Expand Down Expand Up @@ -852,6 +852,8 @@
"You are about to deploy to an existing database. This operation will make permanent changes to the database schema and may result in data loss. Do you want to continue?": "You are about to deploy to an existing database. This operation will make permanent changes to the database schema and may result in data loss. Do you want to continue?",
"Deploy": "Deploy",
"A database with this name already exists on the server": "A database with this name already exists on the server",
"Application version must be in format n.n.n or n.n.n.n where n is a number (e.g., 1.0.0.0)": "Application version must be in format n.n.n or n.n.n.n where n is a number (e.g., 1.0.0.0)",
"Learn More": "Learn More",
"Save Changes": "Save Changes",
"Add Row": "Add Row",
"Show Script": "Show Script",
Expand Down Expand Up @@ -894,7 +896,6 @@
"{0} (filtered)": "{0} (filtered)",
"Remind Me Later": "Remind Me Later",
"Don't Show Again": "Don't Show Again",
"Learn More": "Learn More",
"Accept": "Accept",
"View More": "View More",
"View mssql for Visual Studio Code release notes?": "View mssql for Visual Studio Code release notes?",
Expand Down Expand Up @@ -1986,6 +1987,24 @@
"Database not found on the server": "Database not found on the server",
"Validation failed. Please check your inputs": "Validation failed. Please check your inputs",
"Files": "Files",
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)": "Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)",
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two different validation messages for application version format in this localization bundle. Line 855 correctly describes the validation logic allowing "n.n.n or n.n.n.n", while line 1990 only mentions "n.n.n.n". This creates inconsistency in error messages. Only one message should be used, and it should match the validation logic that accepts both 3 and 4 part versions.

Suggested change
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)": "Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)",
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)": "Application version must be in format n.n.n or n.n.n.n where n is a number (e.g., 1.0.0 or 1.0.0.0)",

Copilot uses AI. Check for mistakes.
"Reveal in Explorer": "Reveal in Explorer",
"DACPAC deployed successfully to database '{0}'/{0} is the database name": {
"message": "DACPAC deployed successfully to database '{0}'",
"comment": ["{0} is the database name"]
},
"DACPAC extracted successfully to '{0}'/{0} is the file path": {
"message": "DACPAC extracted successfully to '{0}'",
"comment": ["{0} is the file path"]
},
"BACPAC imported successfully to database '{0}'/{0} is the database name": {
"message": "BACPAC imported successfully to database '{0}'",
"comment": ["{0} is the database name"]
},
"BACPAC exported successfully to '{0}'/{0} is the file path": {
"message": "BACPAC exported successfully to '{0}'",
"comment": ["{0} is the file path"]
},
"Unable to open Table Explorer: No target node provided.": "Unable to open Table Explorer: No target node provided.",
"Changes saved successfully.": "Changes saved successfully.",
"Row created.": "Row created.",
Expand Down
49 changes: 37 additions & 12 deletions localization/xliff/vscode-mssql.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@
<trans-unit id="++CODE++a187c7382f4026c938df224dd7484977538cd582c67e94b62861499fe68c68a4">
<source xml:lang="en">Application Version</source>
</trans-unit>
<trans-unit id="++CODE++3bce900ec4939301dbcf9f9199be4416b9c310a90af78e6a083fcbb7c517696e">
<source xml:lang="en">Application version must be in format n.n.n or n.n.n.n where n is a number (e.g., 1.0.0.0)</source>
</trans-unit>
<trans-unit id="++CODE++70e9cc5a50f7eb5ba95c18dffd367c22caeef8814be8188d6af4f5654a8fc728">
<source xml:lang="en">Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)</source>
</trans-unit>
Comment on lines +231 to +233
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two different validation messages for application version format with different IDs (lines 228-230 and 231-233). The first one correctly describes the validation logic allowing "n.n.n or n.n.n.n", while the second only mentions "n.n.n.n". This creates inconsistency in error messages. Only one message should be used, and it should match the validation logic that accepts both 3 and 4 part versions.

Suggested change
<trans-unit id="++CODE++70e9cc5a50f7eb5ba95c18dffd367c22caeef8814be8188d6af4f5654a8fc728">
<source xml:lang="en">Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)</source>
</trans-unit>

Copilot uses AI. Check for mistakes.
<trans-unit id="++CODE++31e392d1c0378beca611de66c0f4c71cba29159905cc54242d9bddee5b23d851">
<source xml:lang="en">Apply</source>
</trans-unit>
Expand Down Expand Up @@ -351,9 +357,17 @@
<trans-unit id="++CODE++3f0ddb46dd6305bf6e540e48d31bb83d2b269566ab7d0c8b742bf37022ee716b">
<source xml:lang="en">BACPAC exported successfully</source>
</trans-unit>
<trans-unit id="++CODE++c77ba6ce31916c226def02930b4f3867d3bba2e1814b5528c12d5b3b62828eca">
<source xml:lang="en">BACPAC exported successfully to &apos;{0}&apos;</source>
<note>{0} is the file path</note>
</trans-unit>
<trans-unit id="++CODE++2ba87440799be3f6c8b0aa29316cf97584087cc46962e689c375699adb392137">
<source xml:lang="en">BACPAC imported successfully</source>
</trans-unit>
<trans-unit id="++CODE++98dbbe35459fbe282206441874ff66bc527f1c735eb99367c073ac68f713c396">
<source xml:lang="en">BACPAC imported successfully to database &apos;{0}&apos;</source>
<note>{0} is the database name</note>
</trans-unit>
<trans-unit id="++CODE++76900f1bfd16c8d4dd3d25e6f46638d7165aee23883ccea6bfe071c514421769">
<source xml:lang="en">Back</source>
</trans-unit>
Expand Down Expand Up @@ -993,9 +1007,6 @@
<trans-unit id="++CODE++76475214b86cde3b17e547c917253368f60ab3fb43eb8f71dca4d4c45535c1c5">
<source xml:lang="en">Create a SQL database in Fabric (Preview)</source>
</trans-unit>
<trans-unit id="++CODE++c596645c9e18f8f49df67feda1d83d1015c9e4371593afaba2c24cedf1ae14b4">
<source xml:lang="en">Create a database from a .bacpac file</source>
</trans-unit>
<trans-unit id="++CODE++4cbb437498e0de07f05b633c28f811c67840a2f67e956543557c6085560869e3">
<source xml:lang="en">Create a new firewall rule</source>
</trans-unit>
Expand Down Expand Up @@ -1029,9 +1040,17 @@
<trans-unit id="++CODE++8f56b52b4f497c14810f52351db46c7f638c38f1a321f5bdfb38a3fb817f0ad9">
<source xml:lang="en">DACPAC deployed successfully</source>
</trans-unit>
<trans-unit id="++CODE++c013d84f45a8e17f8b3f0bfea676174416117e054fa2315d1e3f1daeac57af36">
<source xml:lang="en">DACPAC deployed successfully to database &apos;{0}&apos;</source>
<note>{0} is the database name</note>
</trans-unit>
<trans-unit id="++CODE++fec6ccad8071c66a146f4f9bab40620ba0279984c3c35763ac115ac3825fa6fd">
<source xml:lang="en">DACPAC extracted successfully</source>
</trans-unit>
<trans-unit id="++CODE++efa7e304910e512aeaeb6c9dc608a6f993bd69b672cd3de63dba56475ed3e244">
<source xml:lang="en">DACPAC extracted successfully to &apos;{0}&apos;</source>
<note>{0} is the file path</note>
</trans-unit>
<trans-unit id="++CODE++02b435f9a4c73633bef7d3b2b6548de6bb7ec5414c63e0bb6db520a4ca4d1004">
<source xml:lang="en">DacFx service is not available. Profile loaded without deployment options. Publish and generate script operations cannot be performed.</source>
</trans-unit>
Expand Down Expand Up @@ -1136,11 +1155,8 @@
<trans-unit id="++CODE++4c236daafb445f867f574918b3d07c901d73ac48d2ab87edb940b665d79e0039">
<source xml:lang="en">Deploy</source>
</trans-unit>
<trans-unit id="++CODE++e1d68ffa03dfa562a04ba8039fc29b62f9e617556acba87a075a3a8924f621f6">
<source xml:lang="en">Deploy DACPAC</source>
</trans-unit>
<trans-unit id="++CODE++1642403d004fc160293e0464f1a9c0e1fdcff3e3674ba81cb2fbed23c4610739">
<source xml:lang="en">Deploy a data-tier application .dacpac file to an instance of SQL Server</source>
<trans-unit id="++CODE++796590e031547b420cb30aea63caa00543f57651e3244a8823b769a5f1a1a74e">
<source xml:lang="en">Deploy a .dacpac file to a new or existing SQL database</source>
</trans-unit>
<trans-unit id="++CODE++97dc38d5949112e250523663a3556643b30754a83c8305adb6e79d88b13b200d">
<source xml:lang="en">Deploy to Existing Database</source>
Expand Down Expand Up @@ -1497,8 +1513,8 @@
<trans-unit id="++CODE++59be81f2f62e6ced348ccc806b1a50d9370c0f19a8bb5f7fbf8a801d4c93bdca">
<source xml:lang="en">Export BACPAC</source>
</trans-unit>
<trans-unit id="++CODE++ac4a7f1b26c07b58805bc247b84f2cb8349fb9f206e4dcb2e3098cf508562332">
<source xml:lang="en">Export the schema and data from a database to the logical .bacpac file format</source>
<trans-unit id="++CODE++db58c9165373339af3f704ec69490c93458bb6a0c870a7dca79c243948cc02e1">
<source xml:lang="en">Export the schema and data from a SQL database to a .bacpac file</source>
</trans-unit>
<trans-unit id="++CODE++de5cd90f5341f8bb2ebe10270705fa436ac43f8c5ff653358b9eee3a56323ec4">
<source xml:lang="en">Exporting BACPAC...</source>
Expand All @@ -1509,8 +1525,8 @@
<trans-unit id="++CODE++09fb0b40c52653920efa7d90c989b0455616a837458b1690dd908a961ae768dc">
<source xml:lang="en">Extract DACPAC</source>
</trans-unit>
<trans-unit id="++CODE++f86c7ef9f3f43395756fb5dbdf7f9c09cf9663ab86043982da835971f4ae29fb">
<source xml:lang="en">Extract a data-tier application .dacpac from an instance of SQL Server to a .dacpac file</source>
<trans-unit id="++CODE++ae978d30fd899796154f535e3b3c547d46b2bd0c5e738928c553ce1e1e426fc8">
<source xml:lang="en">Extract the schema from a SQL database to a .dacpac file</source>
</trans-unit>
<trans-unit id="++CODE++e4c61f0d341293c441bab44693218614d6045d574d51221cd6a65d43ec0e04d4">
<source xml:lang="en">Extracting DACPAC...</source>
Expand Down Expand Up @@ -1979,6 +1995,9 @@
<trans-unit id="++CODE++09b493255c6cc11aae4f73f97494b4d0123bb42869372d0a2182f0a324eb5ef5">
<source xml:lang="en">Import BACPAC</source>
</trans-unit>
<trans-unit id="++CODE++004f8760d5d76c5e1465f93ee7c48c0dd97666347f270fbbc9d31bbc56482a6d">
<source xml:lang="en">Import a .bacpac file to a new or empty database</source>
</trans-unit>
<trans-unit id="++CODE++3fc78b5e12952afa58a49beceabae7348dd0a44be1b9104b998dc1efc2967de4">
<source xml:lang="en">Importance</source>
</trans-unit>
Expand Down Expand Up @@ -2853,6 +2872,9 @@
<trans-unit id="++CODE++2061d7abe64ff08b697e992f6e5b0e379cae860434c608eb72552f3ce3bbcfc8">
<source xml:lang="en">Publish Changes</source>
</trans-unit>
<trans-unit id="++CODE++cf3c1d568793b842a356b2e44265de54b7f5c9d301b8de3487afd3b1689f7215">
<source xml:lang="en">Publish DACPAC</source>
</trans-unit>
<trans-unit id="++CODE++dce49ef71e44b5c107d066069bd508af15fbffd22c8e410f76db1f120371635a">
<source xml:lang="en">Publish Profile</source>
</trans-unit>
Expand Down Expand Up @@ -3015,6 +3037,9 @@
<trans-unit id="++CODE++942087cc2d41e01304b7195558d093d10c72af8e838c7556d6a02d471ee71852">
<source xml:lang="en">Retry</source>
</trans-unit>
<trans-unit id="++CODE++b1d3c17e8d131616e4c9d243a6536aa7c23973e93908621d94b6b7ebf6486863">
<source xml:lang="en">Reveal in Explorer</source>
</trans-unit>
<trans-unit id="++CODE++ed5c65311daf9e46eb0f5ac74221d4405dabfe18cca554232363495a3a268ca5">
<source xml:lang="en">Reverse Alphabetical</source>
</trans-unit>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@
},
{
"command": "mssql.launchDacpacDialog",
"when": "view == objectExplorer && viewItem =~ /\\btype=(disconnectedServer|Server|Database)\\b/",
"when": "view == objectExplorer && viewItem =~ /\\btype=(disconnectedServer|Server|Database)\\b/ && mssql.experimentalFeaturesEnabled",
"group": "2_MSSQL_serverDbActions@3"
},
{
Expand Down
32 changes: 32 additions & 0 deletions src/constants/locConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2149,6 +2149,38 @@ export class DacpacDialog {
public static Select = l10n.t("Select");
public static Save = l10n.t("Save");
public static Files = l10n.t("Files");
public static InvalidApplicationVersion = l10n.t(
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)",
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validation message format is inconsistent with the actual validation logic. The regex on line 385 accepts both n.n.n and n.n.n.n formats (3 or 4 parts), but this error message only mentions n.n.n.n. This should be updated to match the frontend version: "Application version must be in format n.n.n or n.n.n.n where n is a number (e.g., 1.0.0.0)"

Suggested change
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)",
"Application version must be in format n.n.n or n.n.n.n where n is a number (e.g., 1.0.0.0)",

Copilot uses AI. Check for mistakes.
);
public static RevealInExplorer = l10n.t("Reveal in Explorer");
public static DeploySuccessWithDatabase(databaseName: string): string {
return l10n.t({
message: "DACPAC deployed successfully to database '{0}'",
args: [databaseName],
comment: ["{0} is the database name"],
});
}
public static ExtractSuccessWithFile(filePath: string): string {
return l10n.t({
message: "DACPAC extracted successfully to '{0}'",
args: [filePath],
comment: ["{0} is the file path"],
});
}
public static ImportSuccessWithDatabase(databaseName: string): string {
return l10n.t({
message: "BACPAC imported successfully to database '{0}'",
args: [databaseName],
comment: ["{0} is the database name"],
});
}
public static ExportSuccessWithFile(filePath: string): string {
return l10n.t({
message: "BACPAC exported successfully to '{0}'",
args: [filePath],
comment: ["{0} is the file path"],
});
}
}

export class TableExplorer {
Expand Down
51 changes: 49 additions & 2 deletions src/controllers/dacpacDialogWebviewController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ import {
export const DACPAC_EXTENSION = ".dacpac";
export const BACPAC_EXTENSION = ".bacpac";

// VS Code command constants
const REVEAL_FILE_IN_OS_COMMAND = "revealFileInOS";

/**
* Controller for the DacpacDialog webview.
* Manages DACPAC and BACPAC operations (Deploy, Extract, Import, Export) using the Data-tier Application Framework (DacFx).
Expand Down Expand Up @@ -69,7 +72,7 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<
* Registers all RPC handlers for webview communication
*/
private registerRpcHandlers(): void {
// Deploy DACPAC request handler
// Publish DACPAC request handler
this.onRequest(
dacpacDialog.DeployDacpacWebviewRequest.type,
async (params: dacpacDialog.DeployDacpacParams) => {
Expand Down Expand Up @@ -323,6 +326,10 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<

if (result.success) {
activity.end(ActivityStatus.Succeeded);
// Show success notification for Deploy operation
void this.vscodeWrapper.showInformationMessage(
LocConstants.DacpacDialog.DeploySuccessWithDatabase(params.databaseName),
);
this.dialogResult.resolve(appResult);
} else {
activity.endFailed(
Expand Down Expand Up @@ -372,6 +379,21 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<

if (result.success) {
activity.end(ActivityStatus.Succeeded);
// Show success notification with "Reveal in Explorer" button for Extract operation
const fileName = path.basename(params.packageFilePath);
void this.vscodeWrapper
.showInformationMessage(
LocConstants.DacpacDialog.ExtractSuccessWithFile(fileName),
LocConstants.DacpacDialog.RevealInExplorer,
)
.then((selection) => {
if (selection === LocConstants.DacpacDialog.RevealInExplorer) {
void vscode.commands.executeCommand(
REVEAL_FILE_IN_OS_COMMAND,
vscode.Uri.file(params.packageFilePath),
);
}
});
this.dialogResult.resolve(appResult);
} else {
activity.endFailed(
Expand Down Expand Up @@ -419,6 +441,10 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<

if (result.success) {
activity.end(ActivityStatus.Succeeded);
// Show success notification for Import operation
void this.vscodeWrapper.showInformationMessage(
LocConstants.DacpacDialog.ImportSuccessWithDatabase(params.databaseName),
);
this.dialogResult.resolve(appResult);
} else {
activity.endFailed(
Expand Down Expand Up @@ -466,6 +492,21 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<

if (result.success) {
activity.end(ActivityStatus.Succeeded);
// Show success notification with "Reveal in Explorer" button for Export operation
const fileName = path.basename(params.packageFilePath);
void this.vscodeWrapper
.showInformationMessage(
LocConstants.DacpacDialog.ExportSuccessWithFile(fileName),
LocConstants.DacpacDialog.RevealInExplorer,
)
.then((selection) => {
if (selection === LocConstants.DacpacDialog.RevealInExplorer) {
void vscode.commands.executeCommand(
REVEAL_FILE_IN_OS_COMMAND,
vscode.Uri.file(params.packageFilePath),
);
}
});
this.dialogResult.resolve(appResult);
} else {
activity.endFailed(
Expand Down Expand Up @@ -550,7 +591,13 @@ export class DacpacDialogWebviewController extends ReactWebviewPanelController<
{ ownerUri: ownerUri },
);

return { databases: result.databaseNames || [] };
// Filter out system databases
const systemDatabases = ["master", "tempdb", "model", "msdb"];
const userDatabases = (result.databaseNames || []).filter(
(db) => !systemDatabases.includes(db.toLowerCase()),
);

return { databases: userDatabases };
} catch (error) {
this.logger.error(`Failed to list databases: ${error}`);
return { databases: [] };
Expand Down
Loading
Loading