Граф коммитов

1265 Коммитов

Автор SHA1 Сообщение Дата
Noah Gilson fd7728ac15 Fix typo 2024-09-23 11:03:33 -07:00
Noah Gilson 9c32c5db15 Encase the path search in quotes so it works with Program Files 2024-09-23 10:59:20 -07:00
Noah Gilson 78843d86f4 Add await that eslint asked to remove
TS Lint failed this  `Unexpected `await` of a non-Promise (non-"Thenable") value`.

But the callback can be a promise type. Its just not smart enough to realize that.
2024-09-19 11:06:13 -07:00
Noah Gilson 00f70442ab
Update `existingDotnetPath` to only take affect if it works. (#1946)
* update PATH setting description to make it more clear

* add very prototype code

* add tests and get runtime check working

* Fix some bugs

* Consider that the .NET SDK can also satisfy the Runtime

* fix typo

* fix the tests

* fix

* fix another test

* Fix tests even more

* undo yarn changes

* fix the final test hopefully

* undo yarn changes

* Dont use dotnet.exe as its not platform agnostic

* use "markdownDescription" for nicer rendering in VSCode

* Tweak call to action to use VSCode mechanisms first, then our standard installation docs, and only in the last resort mention PATH munging.

* Fix URLs

* Ignore existingPath setting for SDK installs.

C# DevKit never uses the path returned by our installation. This means users would think this path would change the sdk that this extension uses but that is not the case. This path to dotnet.exe is meant to be the path for the runtime for extensions to run on, and not the SDK path. It's confusing that the setting was used for both and a misstep in a way. DevKit is the main caller of this API so we think we can change this with minimal breakage.

* Remove warning setting and fix invalid path setting

The setting must be accessed earlier. This means vscode will need to be restarted. We also update the readme and messaging a bit so its more publicly clear in all places what the setting is for.

* Fix test

---------

Co-authored-by: Chet Husk <chusk3@gmail.com>
2024-09-18 16:49:50 -07:00
Noah Gilson 6911490b30
Upgrade to the newest version of extension telemetry (#1948)
* upgrade to the newest version of extension telemetry

* remove vscode-extension-telemetry where its not needed

* Update vscode-test as well since its a new library
2024-09-18 13:18:19 -07:00
Noah Gilson 82b6a041fe
Improve ARM Mac Path Check (#1947)
* fix emu

* improve mac path check

* Account for when SDK is not installed under emulation but node js is
2024-09-17 09:33:34 -07:00
Noah Gilson 0b37e6610a
Add PATH for Arm emulation x64 on Mac (#1932)
* 2.1.6 branding

* add other potential mac path from installer/generatePKG.targets -- need to add tests

* fix tests

* Simplfiy expression logic

Co-authored-by: Michael Yanni <MiYanni@microsoft.com>

* Fix syntax

---------

Co-authored-by: Michael Yanni <MiYanni@microsoft.com>
2024-09-11 16:31:23 +00:00
Noah Gilson e9c440e1e8
Migrate to ESLint (#1944)
* get eslint running but its failing a lot of checks

* Fix the linting after migration

* Fix many errors

* 65 errors to go

* fix almost every lint issue

* clean lint

* Remove references to tslint

* dont install eslint as it is already here

* install eslint

* update eslint

* dont empty cache because eslint is failing to register the types that exist

* try to help eslint find the files for type defs

* Set typescript resolver

* Fix imports

* Add some import plugin but still cant import vscode correctly

* install eslint globally

* skip npm installl

* add imports

* try to fix the import issue

* build before hand so the types are picked up -_____-

* Revert "build before hand so the types are picked up -_____-"

This reverts commit e5381b42df.

* rollback to eslint 8 but still run build
2024-09-10 21:39:51 -07:00
Noah Gilson 63cbaf19a7
Quote the Installer Path (#1941)
* Encase the installer path in quotes to protect against spaces in username being parsed poorly, and other path issues. Don't know why we didnt do this before.

* fix linter
2024-09-04 23:29:16 +00:00
Noah Gilson 50261827f3
2.1.6 branding (#1931) 2024-08-20 16:25:38 -07:00
Noah Gilson d57a31f3c8
Handle .NET Failed: Undefined (#1930)
Rejecting a promise with a rejected promise as a return value from a function does not reject with the object the inner promise rejected with. Instead it rejects with an undefined value.

This means if the SDK installer fails or we fail to elevate, that counts as .NET Install failed: undefined. This fixes this. It also adds a check for the string error as this seems to happen sometimes if the password prompt is rejected.

How to test this? Set a break point in win mac global installer on the execute install and edit the command to point to a non existent file. It will then fail and you can see it works now.
2024-08-20 15:34:04 -07:00
Noah Gilson ffc2590f5e
2.1.5 branding (#1929)
* Fix an issue parsing promises

We changed the function `getPromise` to not use a lock in version 2.1.2. This was a mistake. I thought it would return the unresolved `Promise` object if it was a sync function. That is not the behavior, instead it will skip that line of code and return null even if the promise exists. This causes multiple processes to try to grab the installer file handle.

When one fails to grab the file handle, it causes a chain-reaction of cascading failures for concurrent requests, because that is supposed to be blocked from happening.

In addition, the check I added to kill the sudo process once it is finished runs on all platforms despite the master sudo process only being present on Linux, which has resulted in some higher timeout rates. We need to not do this on other platforms.

* Fix tests

we need to clear the promise out after each test is done

* dont call uninstall all in sdk test, its the wrong command

* reset event stream in the test

* 2.1.4 branding - new version due to vscode marketplace outage causing failure to upload version 2.1.3 correctly

* 2.1.5 branding prepare for a new version

bump the version after 2.1.4 was released and skipping a version due to vscode outage
2024-08-20 14:27:36 -07:00
Noah Gilson 95432c0296
2.1.4 branding (#1928)
* Fix an issue parsing promises

We changed the function `getPromise` to not use a lock in version 2.1.2. This was a mistake. I thought it would return the unresolved `Promise` object if it was a sync function. That is not the behavior, instead it will skip that line of code and return null even if the promise exists. This causes multiple processes to try to grab the installer file handle.

When one fails to grab the file handle, it causes a chain-reaction of cascading failures for concurrent requests, because that is supposed to be blocked from happening.

In addition, the check I added to kill the sudo process once it is finished runs on all platforms despite the master sudo process only being present on Linux, which has resulted in some higher timeout rates. We need to not do this on other platforms.

* Fix tests

we need to clear the promise out after each test is done

* dont call uninstall all in sdk test, its the wrong command

* reset event stream in the test

* 2.1.4 branding - new version due to vscode marketplace outage causing failure to upload version 2.1.3 correctly
2024-08-20 13:23:26 -07:00
Noah Gilson 909fcb1bae
Fix an issue parsing promises (#1927)
* Fix an issue parsing promises

We changed the function `getPromise` to not use a lock in version 2.1.2. This was a mistake. I thought it would return the unresolved `Promise` object if it was a sync function. That is not the behavior, instead it will skip that line of code and return null even if the promise exists. This causes multiple processes to try to grab the installer file handle.

When one fails to grab the file handle, it causes a chain-reaction of cascading failures for concurrent requests, because that is supposed to be blocked from happening.

In addition, the check I added to kill the sudo process once it is finished runs on all platforms despite the master sudo process only being present on Linux, which has resulted in some higher timeout rates. We need to not do this on other platforms.

* Fix tests

we need to clear the promise out after each test is done

* dont call uninstall all in sdk test, its the wrong command

* reset event stream in the test
2024-08-20 11:25:33 -07:00
Noah Gilson 524b14e992
Don't set HOME environment variable (#1923)
* prevent proxy settings from setting HOME

* Update changelog.md
2024-08-16 14:00:59 -07:00
Noah Gilson 8bc2ecfdc3
Allow uninstallation of global .NET Installations (#1897)
* Add failure handling for file integrity check

This is now what is hitting the EPERM and ENOENT errors.
We need to skip the check and see what happens from here, such as allowing to elevate via windows.

This also adds specific handlers for when we fail to download the SDK.

* elevate on windows

* Retry if no permission is available the first time

Need to double check that cancelling is handled properly now that its a promise reject

* respond to linter

* Add API to uninstall any install

* Add tests

* undo bad save

* dont uninstall if there are multiple owners

* add some basic uninstall capability

* allow elevation on mac

* fix promise chain a bit, may need to await still

* add uninstall functionality to linux

* add uninstall on linux

* fix merge

* Add a test

* add ui element to pick uninstall

we need to fix the uninstallglobal functoin logic to print out and such still
then test it

* add some output, need to test and check graveyard

* add uninstall events

* fix build

* Fix uninstall to pop up above window

* ui changes per request

* fix test

* fix merge err

* fix mac test

* fix name option

* fix promise logic

* fix promise code again xd

* Add icons for the extension

* add icons to shield and uninstall

* set minimum vscode version to require new icons

* dont sort if no install exists

* use noninteractive frontend in master process to fix dpk unable to re open stdin on uninstall

* try to exit sudo process master and set env var for stdin uninstall fix

* fix eventstream

* fix detection logic for uninstall

* add -y to uninstall

* fix bug with uninstall

* add version check for when disk is full and version string ui fails

* also kill sudo process on uninstall

* use -f to delete file as they may not exist and we dont want to fail due to this at the end

* add -y to update

* respond to linter

* remove unnecessary img

* respond to linter

* respond to pr feedback

* fix when extension may have null record
2024-08-15 22:22:20 +00:00
Noah Gilson 20261b57c3
Don't fail if the user is offline (#1898)
* add function to call in extensoin.ts for offline mode acceptAlternativeVersions on acquirectx

* refactor version helper functions outside of version resolver

version resolver is a class that is based around using the internet. It probably should have been like this before.

* add code to check existing installing versions

* Update test name

* respond to linter

* Update lint

* Fix bugs and add messages

* respond to pr feedback
2024-08-15 19:29:03 +00:00
Noah Gilson 5763a14e48
Fix MicroBuild Staging (#1915)
* move signing prep into another template so we can not push microbuild to staging directory

* condition the signing prep

* fix the cond since yaml has dumbest syntax ever

* fix whitespace i hate yaml

* remove junk:

* succeded doesnt work
2024-08-14 13:48:42 -07:00
Noah Gilson c2c90e5795
Update Axios (#1913)
* update axios

* update axios to latest

* remove unnecessary dependency

* remove axios

this is not needed here

* remove axios

* reset sha integrities
2024-08-14 13:43:15 -07:00
Noah Gilson 76d021ec1a
Fix parsing `-preview` versions in the registry when installed via Visual Studio (#1914)
* remove -preview from the version parsing to prevent trying to cast it to a number

* fix nullabilty check
2024-08-13 22:31:09 +00:00
Noah Gilson cc797dfedb
✒️ Enable ESRP Signing on the .VSIX (#1885)
* Add fake MSBuild project to allow signing VSIX and JS

* Sign JS

* Add step to pipeline

* Restrict signing package version

* Add scripts to install signing tool locally

* only go up 1 directory

* fix display name

* fix whitespace -__-

* add build step for installing microbuild

* add sign type parameter

* dont produce alpha package in official drop

* add sign type parameter to default pipeline

* dont publish package in another directory as this causes other issues, instead copy the artifact

* acknowledge the existence of a document explaining the release and other maintenance processes

this information is more suited for internal repo changes.

* change internal stream to a different signing stream

* add dotnet public for notargets sdk

* reduce to 1 feed

* use a different feed

* Use dotnet team

* use explicit feed source

* add feed auth

* fix comment

* rename unsigned vsix so both can get dropped

* use the other type of slash for REN -__-

* try to fix path

* add packages folder with empty gitignore

* figure out dir

* fix rename command

* Fix rename

the 'unsigned' one is actually the signed one

* Fix JS File Sign

dist is at the root of each but this runs in a segregated folder

* produce binlogs and try to fix the path

* Publish SDK Extension Logs

* fix signing

* remove bad slash in path that gets parsed incorrectly

* remove \

* fix microbuild to be installed b5 js signing

* update gitignore

* fix gitignore again

* [REVERT THIS] Add a file A.ts to see if files are signed alphabetical or only non minified JS is signed

* [REVERT THIS] Add content to js to see if minify changes signing

* sign js after webpack

maybe we can sign it after the bundle is created and it will  still be able to edit the bundle vsix internals? I thought not but perhaps extension.js is getting replaced by the webpack, so lets see if this works.

* Revert "[REVERT THIS] Add content to js to see if minify changes signing"

This reverts commit ecacc6830b.

* Revert "[REVERT THIS] Add a file A.ts to see if files are signed alphabetical or only non minified JS is signed"

This reverts commit 1ab6ea1873.

* Update name of incorrect task.
2024-08-12 11:04:24 -07:00
Noah Gilson bbd5f88681
Allow elevation through non-linux commands (#1881)
* Add failure handling for file integrity check

This is now what is hitting the EPERM and ENOENT errors.
We need to skip the check and see what happens from here, such as allowing to elevate via windows.

This also adds specific handlers for when we fail to download the SDK.

* elevate on windows

* Retry if no permission is available the first time

Need to double check that cancelling is handled properly now that its a promise reject

* respond to linter

* allow elevation on mac

* fix promise chain a bit, may need to await still
2024-08-07 15:31:34 -07:00
Noah Gilson b1e85ced25
Fix offline detection (#1907)
* Fix offline detection

8.8.8.8 blocks our requests. We can use microsoft.com instead, if our app is checking using microsoft, well, if microsoft is down we've learned that the app will have problems anyways , so if that is down it doesnt matter as much.

* fix variable name

* respond to linter

* respond to PR feedback, fix whitespace and ??
2024-08-06 21:57:15 +00:00
Noah Gilson ddac92e166
Fix ARM64 Installation Windows Detection Logic (#1908)
* fix typo

* detect arm64 as well
2024-08-05 20:11:48 +00:00
Noah Gilson 77c091e862
Allow detecting pre existing global installs (#1903)
* allow detecting pre existing global installs

* untrack version which was externally uninstalled
2024-08-05 09:24:00 -07:00
Noah Gilson 020b9da335
Update node and typescript dependencies (#1900) 2024-07-31 15:15:55 -07:00
Noah Gilson a796c416d6
fix merge issue (#1896) 2024-07-31 09:38:54 -07:00
Noah Gilson cfbbbee5b3
Separate 1 Lock into 2 Mutexes/Locks for Data Management (#1891)
* add some fixes for lock, amend

* Use a separate lock for install vs installing

This will yield performance improvements.

* remove change that snuck in from another pr

* fix linter

* make functions not async if they dont need to be
2024-07-30 15:44:36 -07:00
Noah Gilson a92e3c809a
Add API to uninstall just one runtime (#1894)
* Add API to uninstall any install

* Add tests

* undo bad save

* dont uninstall if there are multiple owners
2024-07-30 22:35:51 +00:00
Noah Gilson a9cbf6ba66
2.1.2 branding (#1893) 2024-07-30 11:28:09 -07:00
Noah Gilson 6c4b583e65
Version 2.1.1, Hot fix for installation record tracking (#1888)
* Hot fix for installation record tracking

We renamed it from 'key' to 'id' because the string 'key' is filtered out of all log events via vscode because 'key' looks like a secret. We did this in a rush and vendor testing did not have pre-existing machine state to realize the old data structure would still be in the local memory for pre-existing users. This converts the data in memory to the new type.

* Prevent adding corrupted installation records into the data
2024-07-17 15:56:43 -07:00
Noah Gilson 8e5b448c05
2.1.0 Branding (#1883) 2024-07-16 23:44:05 +00:00
Noah Gilson 22b1065cd5
Try to find the .NET SDK PATH on Mac if it Installs to Unexpected Loc (#1884)
* Try to find the .NET SDK PATH on Mac if it Installs to Unexpected Location

Our highest failure for .NET SDK Installs is that the `InstallationValidator` which checks the hard-coded expected path of Installation does not find .NET in the expected location. Unfortunately, nobody has reported this.

To get to this point in the code of `Validation`, everything has to have succeeded, including the installer only returning and exiting 0, which it would only do upon installation success.

I'm guessing there is some undocumented case where the .NET SDK is installed to a different location, but I couldn't find where.

Here is our path check. https://github.com/dotnet/vscode-dotnet-runtime/blob/main/vscode-dotnet-runtime-library/src/Acquisition/WinMacGlobalInstaller.ts#L239

According to the installer source code and our documentation, it should only install to this location or with x64 during emulation.
```
<PkgInstallDirectory>/usr/local/share/dotnet</PkgInstallDirectory>
      <x64EmulationPkgInstallDirectory>/usr/local/share/dotnet/x64</x64EmulationPkgInstallDirectory>
```

The 64 directory however, is only for when you install a 64-bit SDK on an ARM Mac. We wouldn't expect this to happen because we only install the SDK that matches os.platform(), so we should never install an x64 SDK on an ARM machine.

I'm curious to see where this path is and this will also help us track that.
It's a bit of a hack, but I think it will have the desired outcome.

* Remove extra check for global since this only happens in global code
2024-07-16 23:21:31 +00:00
Noah Gilson aefdcf3a60
Remove references to the string 'key' and change them to 'id' (#1882)
* Change 'InstallKey' terminology to 'InstallId'

VS Code has a filter for the string 'key' -- this causes our telemetry to be dropped when referencing the term 'install key' as it thinks it may be a secret. 48ba01b589/src/vs/platform/telemetry/common/telemetryUtils.ts (L336)

Id is safe. I talked with the vscode team and there is no good alternative besides turning off all telemetry safety scanning, which I didn't want to do.

Hence, 'key' --> 'id'

* rename key to id

* rename remaining instances of 'id'

* Improve names of types
2024-07-16 23:07:21 +00:00
Noah Gilson bba9719f4b
Interpret Installer Exit Codes (#1880)
* Interpret Installer Exit Codes

These will give the user more actionable items, and also increase the chances the post a log so we can help them if something goes wrong and understand the issue better.

* Add page fault message

* Add Timeout error code

* Use Native Code Message

* Use err message from https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--1300-1699-

* Use particular error code from windows

* Use the official error message.
2024-07-16 22:40:52 +00:00
Noah Gilson 1ff584392c
Add failure handling for file integrity check (#1878)
* Add failure handling for file integrity check

This is now what is hitting the EPERM and ENOENT errors.
We need to skip the check and see what happens from here, such as allowing to elevate via windows.

This also adds specific handlers for when we fail to download the SDK.

* missing semicolon
2024-07-16 11:53:44 -07:00
Noah Gilson bb58854fcb
Move to node 20 (#1879)
It includes some permissions changes and other stability fixes, vscode main is also now on node 20.
2024-07-16 11:15:58 -07:00
Noah Gilson ac6de3d303
Fix Linux Update (#1874)
* add additional test for acquire status

this bug could exist with the current tests, need to prevent this bug.

* remove the extra update
2024-07-12 10:10:06 -07:00
Noah Gilson e4ef1363d5
Add AcquireStatus support for ASP.NET runtimes (#1869)
The C#DevKit team would like this API to support ASP.NET Runtimes as well.
2024-07-11 09:27:34 -07:00
Noah Gilson d602636e2e
Update Linux Apt Commands to Handle Lock Timeouts (#1861)
* Make Command Executor return an object instead of string

This prevents us from having to run commands twice to get the status and stdout.

Caution must be taken to make sure that the assumptions here in what is returned as stdout vs stderr are correct.

Furthermore, when looking at the code, I saw something that looked just plain incorrect, so I will need to investigate that by adding the TODO before merge

* Fix Execution Type Parsing

* fix linting issue

* Fix line parsing logic

* Fix tests

* Run icacls to set execute permissions

* move to sha256

* remove unnecessary code

* Remove todo that should go in another PR

* Remove redundant trim

* rename class CommandProcessorOutput since it didnt match CommandExecutor

* Rename class file

* Report json object for failed permissions.

* Fix test to use correct folder

* fix lint

* Fix installer file deletion

* respond to linter

* Try to Add a Timeout for Installer.Exe

This will allow us to not count times when users never respond to the installer as a failure and or remediate when the installer is taking too long.

* Add .editorconfig for style settings

* Update Linux Apt Commands to Handle Lock Timeouts

We also pass the -y flag when it can help push through updates.
Apt will return 100 whenever there is any failure. aa56836331/apt-private/private-cmndline.cc (L602)

This means the errors we are seeing are not just due to locking errors. But, perhaps this will help.

Also this will try to run update twice, to see if that 2nd try will work. It seems a bit silly, but it does actually seem to improve the chance of success when something else is running on the system.

* Update distro failure message b to have the same information as the other failure message

* Fix package is available check

* Remove verbosity as it is not helpful or needed information to help customers

* Remove -y

it doesnt do anything for update lol

* fix json

* try  forking

* just rely on node timeout

* update test data

* Handle .net installer timeouts

* remove unnecessary import

* Fix tests

* Include stderr for more failure detail

* fix options check

* Fix option

* Include options that are needed to preserve the working env on a general command execution

* Remove hash as it already gets anonymized by the regular expression

* Increase lock timeout time as now with waiting for lock it can take longer

* Add passive option to automate dialog

* Skip extra hashing thats handled by the regular expression

* Add a timeout to kill our subprocesses that hold onto the lock

* Timeout default is seconds not minutes

* Make code more clear to read by moving else after return into else

* Improve lock file handling on install tracker

* Adhere to style convention with release() block

* add back in -y to automate

---------

Co-authored-by: Ubuntu 1804 <you@example.com>
2024-07-10 11:25:46 -07:00
Noah Gilson a5d3ad5d51
Timeout Installer.Exe (#1859)
* Make Command Executor return an object instead of string

This prevents us from having to run commands twice to get the status and stdout.

Caution must be taken to make sure that the assumptions here in what is returned as stdout vs stderr are correct.

Furthermore, when looking at the code, I saw something that looked just plain incorrect, so I will need to investigate that by adding the TODO before merge

* Fix Execution Type Parsing

* fix linting issue

* Fix line parsing logic

* Fix tests

* Run icacls to set execute permissions

* move to sha256

* remove unnecessary code

* Remove todo that should go in another PR

* Remove redundant trim

* rename class CommandProcessorOutput since it didnt match CommandExecutor

* Rename class file

* Report json object for failed permissions.

* Fix test to use correct folder

* fix lint

* Fix installer file deletion

* respond to linter

* Try to Add a Timeout for Installer.Exe

This will allow us to not count times when users never respond to the installer as a failure and or remediate when the installer is taking too long.

* Add .editorconfig for style settings

* try  forking

* just rely on node timeout

* Handle .net installer timeouts

* remove unnecessary import

* fix options check

* Fix option

* Include options that are needed to preserve the working env on a general command execution

* Add passive option to automate dialog

* dont use english url
2024-07-09 23:52:13 +00:00
Noah Gilson e68687f05e
2.0.9 branding (#1852)
* 2.0.8 branding

* 2.0.9 branding for future

need to update the changelog in the future

* Update vscode-dotnet-runtime-extension/CHANGELOG.md
2024-07-03 14:47:50 -07:00
Noah Gilson d2fa396f0f
Respond to PR feedback to improve icacls ordering and not do extra chmod (#1860) 2024-07-03 14:47:04 -07:00
Noah Gilson 8cabdcf3a7
Prevent EPERM error hit when trying to open installer.exe (#1855)
* Make Command Executor return an object instead of string

This prevents us from having to run commands twice to get the status and stdout.

Caution must be taken to make sure that the assumptions here in what is returned as stdout vs stderr are correct.

Furthermore, when looking at the code, I saw something that looked just plain incorrect, so I will need to investigate that by adding the TODO before merge

* Fix Execution Type Parsing

* fix linting issue

* Fix line parsing logic

* Fix tests

* Run icacls to set execute permissions

* move to sha256

* remove unnecessary code

* Remove todo that should go in another PR

* Remove redundant trim

* rename class CommandProcessorOutput since it didnt match CommandExecutor

* Rename class file

* Report json object for failed permissions.

* Fix test to use correct folder

* fix lint

* Fix installer file deletion

* respond to linter
2024-07-03 14:10:51 -07:00
Noah Gilson 557ffc63b9
Handle No Connection Errors Better (#1854)
Axios (web request library we use) has a bug with no connection timeouts. Its timeout handler only works with request timeouts, not no connection timeouts. More at https://stackoverflow.com/questions/36690451/timeout-feature-in-the-axios-library-is-not-working. So yeah, it's going to be stuck forever waiting for a connection.
I fixed #2 in the past by adding a custom timeout with a cancellation token. dotnet/vscode-dotnet-runtime@ced82f3#diff-ad11027eb5a8406f68425da0e49b1c8a4aa83394444043e247c10e7bb1976999

It looks like I got rid of that because I forgot about the axios timeout issue. dotnet/vscode-dotnet-runtime@3b1c251
2024-07-01 20:59:40 +00:00
Noah Gilson cb56b8b784
2.0.8 branding (#1851) 2024-07-01 13:22:55 -07:00
Noah Gilson 3659364c3f
Add Support for ASP.NET Installation (#1843)
* wip - separate out worker paths so contexts are needed for every call, but there is less potential for things to go wrong and less code duplication

* Further isolate code, need to isolate the install tracker now

* migrate install tracker to use event stream instead of being coupled to the context

* move installtracker to a singleton and fix tests

the install tracker really only needs to exist once since the event stream and extension state are global, this will prevent errors from different states of promises and simplify our code with this design pattern to decouple the installation tracking mechanism from the context object, which will reduce code duplication for aspnet install feature additions

* Fix some issues with the test during code migration

* Fix issue with accessing instance

I forgot to ctrl s!

* Clean up logic with install key generation

* Remove duplicate source of truth for architecture

* Improve logging and error handling of install tracker

This class is super annoying to debug without better logging

* Update some broken components of the tests

* Prevent saying object object in the log output by expanding the object

* Tests working

We used to need to concat these tests results with different contexts but not any longer

* FIx uninstall all commands

* Fix the file rename

* Improve logging messages

* Add mode handling for aspnet

* Add ASP NET Support

* Add Generic -> Mode Specific Event Stream Class Hierarchy

* [wip] create events for all 'modal' events

* Dont hold a generic arg obj because it becomes too unwieldy

* Fix some issues with the test and sdk extension

* Add 'mode' to the acquire context

This will allow API callers to set the mode to call aspnet without having to write a new endpoint call. We can default to runtime for when it wasnt provided that would be the old behavior.

* Move 'installMode' into the acquire context

This allows API callers to provide the mode,
We remove it from the worker context to dedupe this and prevent 2x sources of truth.

Now this is a bit weird because some API endpoints will take the mode even though the API endpoint is only for one mode. We will just ignore the mode for that. Eventually we can try to transition all of the related calls to a single endpoint based on 'mode' which would simplify API usage.

* Code cleanup

* De-Dupe Test Code

* Add Requested Events to Republisher

* Update InstallKey pattern to include ~aspnetcore

This is a bit strange since - used to be for 'global' and ~ for architecture. There are only so many path safe characters to use, more importantly though we dont rely on the install key as the information for the install anymore, it is stored in the DotnetInstall object. ~ has logic in place to not account for a 'legacy' install, so ~ with aspnet (which would not have existed before arch was added) is also a bet that will work with pre-existing logic.

* fix build issues

* Add ASP.NET Directory Provider

* Only Report Total Success if Path exists

The path can be undefined if an error throws so its not a success

* Add ASP.NET API to sample extension

* Resolve Asp Net Runtime versions as Runtime versions

* Fix mistake on test

* Fix bug with install script param

* add source-map-support to allow build in CI

this got removed and passed earlier somehow

* respond to linter

* add source map support

* Respond to linter

* Add test for specific telemetry messages

* 2.0.7 branding

* Prevent circular import

* rewrite completion event so we can test the modaleventrepublisher

* fix linter issue

* Revert new test since the object is not mockable

* Get rid of check for event that cannot be published via mocks

* Fix bug where logging was not up to date

to prevent i/o costs the file is dumped at the end of error handling, but this means other events past error handling dont get added to the log. This fixes this.

* respond to pr feedback
2024-06-25 17:22:20 +00:00
Noah Gilson 0655891a09
Clean Up Dependency Tree & Update 3rd Party Notice 🏛️ (#1842)
* Remove 'Debug' As it's not used

* Remove 'Diff' as it's not used

* Remove 'es-abstract' as its not used

* Remove 'got' as its not used

* Remove http cache semantics from the main dependencies list

its just a sub dependency

* Remove 'p-retry' as its not used

* Remove 'public-ip' as its not used

* Remove tslint from dependencies, its not a dependency

* Increase attribution information for library dependencies

* Remove a ton of unused dependencies

* Clean out dependency tree

* Clean up sample extension dependencies

* Fix SDK Yarn.Lock

* Fix sample yarn.lock

* Reorder remaining licenses to match package.json

* add missing semver package that used to be included elsewhere by other dependencies

* Delete vscode-dotnet-runtime-extension/yarn-error.log

* Update readme.md with notices per industry standard

* Add back in ts-loader as it is required
2024-06-18 14:25:35 -07:00
Noah Gilson 611071b78f
[1/N] Add ASP.NET Support - Refactor Installation Worker (#1835)
* wip - separate out worker paths so contexts are needed for every call, but there is less potential for things to go wrong and less code duplication

* Further isolate code, need to isolate the install tracker now

* migrate install tracker to use event stream instead of being coupled to the context

* move installtracker to a singleton and fix tests

the install tracker really only needs to exist once since the event stream and extension state are global, this will prevent errors from different states of promises and simplify our code with this design pattern to decouple the installation tracking mechanism from the context object, which will reduce code duplication for aspnet install feature additions

* Fix some issues with the test during code migration

* Fix issue with accessing instance

I forgot to ctrl s!

* Clean up logic with install key generation

* Remove duplicate source of truth for architecture

* Improve logging and error handling of install tracker

This class is super annoying to debug without better logging

* Update some broken components of the tests

* Prevent saying object object in the log output by expanding the object

* Tests working

We used to need to concat these tests results with different contexts but not any longer

* FIx uninstall all commands

* Fix the file rename

* Improve logging messages

* fix indentation
2024-06-17 17:51:42 +00:00
Noah Gilson eb44baba8a
bump dependencies (#1838)
braces needs to be updated due to an issue with their newest release
2024-06-17 16:51:11 +00:00