Compare commits

...

10 Commits

Author SHA1 Message Date
Baptiste Augrain
de583c88fa
chore: clean up 2025-12-17 02:45:45 +01:00
Baptiste Augrain
199403b590
v1.3.2-255408 2025-08-13 10:15:05 +02:00
huperniketes
102e2bdc8c
fix(macos): add std::optional (#1) 2025-08-13 10:10:38 +02:00
Baptiste Augrain
ade3677586
v1.3.2-252465 2025-04-12 19:06:36 +02:00
Baptiste Augrain
70dd6d80ff
Merge branch 'ms' 2025-04-12 19:06:19 +02:00
Robo
d0d3d8ca5b
fix: handle async worker completion (#55) 2025-04-08 10:27:40 +00:00
Baptiste Augrain
3b435f646f
v1.3.1-2504060125 2025-04-06 01:28:19 +02:00
Baptiste Augrain
23aa4601d0
Merge branch 'ms' 2025-04-06 01:27:42 +02:00
Josh Spicer
ad115ae1b7
1.3.1 (#54) 2025-03-31 10:36:45 -07:00
Josh Spicer
e925b14ac8
Emit 'undefined' value for removed policy (https://github.com/microsoft/vscode/issues/244997) (#53) 2025-03-28 15:03:57 -07:00
12 changed files with 20 additions and 65 deletions

View File

@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org
- name: Setup Python 3
uses: actions/setup-python@v5

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
v22.20.0

View File

@ -3,6 +3,11 @@
[![Version](https://img.shields.io/npm/v/@vscodium/policy-watcher.svg)](https://npmjs.org/package/@vscodium/policy-watcher)
## <a id="fork"></a>Why fork from microsoft/vscode-policy-watcher
`microsoft/vscode-policy-watcher` is limited to only to the `Microsoft` vendor.
`@vscodium/policy-watcher` removes that limit so it can be used by any vender.
## <a id="usage"></a>Usage
```js

View File

@ -1,41 +0,0 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
## Security
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
## Reporting Security Issues
**Please do not report security vulnerabilities through public GitHub issues.**
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly.
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
## Preferred Languages
We prefer all communications to be in English.
## Policy
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
<!-- END MICROSOFT SECURITY.MD BLOCK -->

View File

@ -1,13 +0,0 @@
# Support
## How to file issues and get help
This project uses GitHub Issues to track bugs and feature requests. Please search the existing
issues before filing new issues to avoid duplicates. For new issues, file your bug or
feature request as a new Issue.
For help and questions about using this project, please use the [issue tracker](https://github.com/vscodium/policy-watcher/issues).
## Microsoft Support Policy
Support for this project is limited to the resources listed above.

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@vscodium/policy-watcher",
"version": "1.3.0-2503241459",
"version": "1.3.2-255408",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@vscodium/policy-watcher",
"version": "1.3.0-2503241459",
"version": "1.3.2-255408",
"license": "MIT",
"dependencies": {
"bindings": "^1.5.0",

View File

@ -1,6 +1,6 @@
{
"name": "@vscodium/policy-watcher",
"version": "1.3.0-2503300035",
"version": "1.3.2-255408",
"description": "",
"main": "index.js",
"repository": {

View File

@ -34,6 +34,7 @@ public:
void OnExecute(Napi::Env env);
void Execute(const ExecutionProgress &progress);
void OnProgress(const Policy *const *policies, size_t count);
void OnOK();
void Dispose();
protected:

View File

@ -24,4 +24,5 @@ void PolicyWatcher::AddBooleanPolicy(const std::string name) {}
void PolicyWatcher::OnExecute(Napi::Env env) {}
void PolicyWatcher::Execute(const ExecutionProgress &progress) {}
void PolicyWatcher::OnProgress(const Policy *const *policies, size_t count) {}
void PolicyWatcher::OnOK() {}
void PolicyWatcher::Dispose() {}

View File

@ -93,15 +93,13 @@ void PolicyWatcher::Execute(const ExecutionProgress &progress)
switch(policy->refresh())
{
case PolicyRefreshResult::Updated:
case PolicyRefreshResult::Removed:
updatedPolicies.push_back(policy.get());
update = true;
break;
case PolicyRefreshResult::Unchanged:
updatedPolicies.push_back(policy.get());
break;
case PolicyRefreshResult::Removed:
update = true;
break;
}
}
@ -130,6 +128,8 @@ void PolicyWatcher::OnProgress(const Policy *const *policies, size_t count)
Callback().Call(Receiver().Value(), {result});
}
void PolicyWatcher::OnOK() {}
void PolicyWatcher::Dispose()
{
disposed = true;

View File

@ -8,6 +8,7 @@
#include <napi.h>
#include <CoreFoundation/CoreFoundation.h>
#include <optional>
#include "../Policy.hh"
using namespace Napi;
@ -69,4 +70,4 @@ protected:
private:
};
#endif
#endif

View File

@ -77,15 +77,13 @@ void PolicyWatcher::Execute(const ExecutionProgress &progress)
switch (policy->refresh())
{
case PolicyRefreshResult::Updated:
case PolicyRefreshResult::Removed:
updatedPolicies.push_back(policy.get());
update = true;
break;
case PolicyRefreshResult::Unchanged:
updatedPolicies.push_back(policy.get());
break;
case PolicyRefreshResult::Removed:
update = true;
break;
}
}
@ -112,6 +110,8 @@ void PolicyWatcher::OnProgress(const Policy *const *policies, size_t count)
Callback().Call(Receiver().Value(), {result});
}
void PolicyWatcher::OnOK() {}
void PolicyWatcher::Dispose()
{
SetEvent(handles[1]);