fleet/ee/fleetd-chrome/package.json
Scott Gress 36b45b857f
Fix privacy_preferences table for ChromeOS (#26620)
For #25479 

# Checklist for submitter

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [X] Manual QA for all new/changed functionality

## Details

This PR fixes the `privacy_preferences` table results generator for the
Chrome Extension. The root cause was that we were attempting to return
boolean values directly to sqlite, which doesn't have a native boolean
type. The fix is to coerce booleans to "1" or "0" as we do for other
tables in the extension.

The _proximate_ cause of the issue was that the warnings generated at
the db level (in this case about not being able to handle the `null`
values that sqlite was coercing booleans to) are not being handled
correctly. I'll tackle this in a separate PR as it's a little more
complicated to debug and fix.

## Testing

On a Chromebook, was able to run a live `select * from
privacy_preferences` query with results:
<img width="1706" alt="image"
src="https://github.com/user-attachments/assets/7dcc4410-70fd-4381-842d-fd06d43b94ae"
/>
<img width="1708" alt="image"
src="https://github.com/user-attachments/assets/db783e7b-3351-424c-82e3-b7e80c1d999d"
/>

Added automated test that fails on main and passes on this branch.
2025-02-28 09:52:00 -06:00

48 lines
1.3 KiB
JSON

{
"name": "fleetd-for-chrome",
"description": "Extension for Fleetd on ChromeOS",
"version": "1.3.1",
"dependencies": {
"async-mutex": "^0.5.0",
"dotenv": "^16.0.3",
"wa-sqlite": "github:rhashimoto/wa-sqlite#v0.9.11"
},
"devDependencies": {
"@jest/globals": "^29.5.0",
"@types/chrome": "^0.0.224",
"@types/jest": "^29.5.11",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.3",
"html-webpack-plugin": "^5.5.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.7.0",
"msw": "^1.1.0",
"sass-loader": "^13.2.0",
"style-loader": "^3.3.1",
"ts-jest": "^29.0.5",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.2",
"typescript": "^4.9.5",
"webpack": "^5.94.0",
"webpack-cli": "^5.0.1",
"webpack-merge": "^5.8.0"
},
"scripts": {
"build": "webpack --config webpack.prod.js",
"dev": "webpack --config webpack.dev.js",
"watch": "webpack -w --config webpack.dev.js",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"test-watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"type": "module",
"eslintConfig": {
"extends": "react-app",
"env": {
"browser": true,
"webextensions": true
}
},
"msw": {
"workerDirectory": "src"
}
}