Updating wa-sqlite to latest version. (#16484)
This is a speculative fix for #16394 RuntimeError, which was coming from wa-sqlite web assembly code. # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. - [x] Manual QA for all new/changed functionality
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Updated fleetd-chrome to use the latest wa-sqlite v0.9.11
|
||||
Generated
+5
-5
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "fleetd-for-chrome",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "fleetd-for-chrome",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.3",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.0.3",
|
||||
"wa-sqlite": "github:rhashimoto/wa-sqlite#buildless"
|
||||
"wa-sqlite": "github:rhashimoto/wa-sqlite#v0.9.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/globals": "^29.5.0",
|
||||
@@ -8322,8 +8322,8 @@
|
||||
}
|
||||
},
|
||||
"node_modules/wa-sqlite": {
|
||||
"version": "0.8.9",
|
||||
"resolved": "git+ssh://git@github.com/rhashimoto/wa-sqlite.git#595b1047f687377322474e427dc19c12606fe04a"
|
||||
"version": "0.9.11",
|
||||
"resolved": "git+ssh://git@github.com/rhashimoto/wa-sqlite.git#390744d41c61aa0bbd53d3c738abef5e23f71cc4"
|
||||
},
|
||||
"node_modules/walker": {
|
||||
"version": "1.0.8",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "fleetd-for-chrome",
|
||||
"description": "Extension for Fleetd on ChromeOS",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.3",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.0.3",
|
||||
"wa-sqlite": "github:rhashimoto/wa-sqlite#buildless"
|
||||
"wa-sqlite": "github:rhashimoto/wa-sqlite#v0.9.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/globals": "^29.5.0",
|
||||
|
||||
@@ -50,7 +50,7 @@ export default abstract class Table implements SQLiteModule {
|
||||
|
||||
// This is replaced by wa-sqlite when SQLite is loaded up, but missing from the SQLiteModule
|
||||
// definition. We add it here to make Typescript happy.
|
||||
handleAsync(f: () => Promise<number>): Promise<number> {
|
||||
handleAsync(_: () => Promise<number>): number {
|
||||
throw new Error("should be replaced in build");
|
||||
}
|
||||
|
||||
@@ -61,37 +61,37 @@ export default abstract class Table implements SQLiteModule {
|
||||
appData: any, // Application data passed to `SQLiteAPI.create_module`.
|
||||
argv: Array<string>,
|
||||
pVTab: number,
|
||||
pzString: { set: (arg0: string) => void }
|
||||
): number | Promise<number> {
|
||||
pzErr: DataView,
|
||||
): number {
|
||||
// Register the table schema.
|
||||
const sql = `CREATE TABLE ${this.name} (${this.columns.join(",")})`;
|
||||
pzString.set(sql);
|
||||
this.sqlite3.declare_vtab(db, sql);
|
||||
return SQLite.SQLITE_OK;
|
||||
}
|
||||
|
||||
xBestIndex(
|
||||
pVTab: number,
|
||||
indexInfo: SQLiteModuleIndexInfo
|
||||
): number | Promise<number> {
|
||||
): number {
|
||||
// In the future we might be able to use this for some tables to optimize queries.
|
||||
return SQLite.SQLITE_OK;
|
||||
}
|
||||
|
||||
xDisconnect(pVTab: number): number | Promise<number> {
|
||||
xDisconnect(pVTab: number): number {
|
||||
return SQLite.SQLITE_OK;
|
||||
}
|
||||
|
||||
xDestroy(pVTab: number): number | Promise<number> {
|
||||
xDestroy(pVTab: number): number {
|
||||
return SQLite.SQLITE_OK;
|
||||
}
|
||||
|
||||
xOpen(pVTab: number, pCursor: number): number | Promise<number> {
|
||||
xOpen(pVTab: number, pCursor: number): number {
|
||||
// Initialize a new cursor state (called at the beginning of a query to the table).
|
||||
this.cursorStates.set(pCursor, new cursorState());
|
||||
return SQLite.SQLITE_OK;
|
||||
}
|
||||
|
||||
xClose(pCursor: number): number | Promise<number> {
|
||||
xClose(pCursor: number): number {
|
||||
// Clean up the cursor state (called when the query completes). Important that we do this so
|
||||
// that the resources don't remain allocated after the query completes!
|
||||
this.cursorStates.delete(pCursor);
|
||||
@@ -103,7 +103,7 @@ export default abstract class Table implements SQLiteModule {
|
||||
idxNum: number,
|
||||
idxStr: string | null,
|
||||
values: Array<number>
|
||||
): Promise<number> {
|
||||
): number {
|
||||
// Generate the actual query results here during this filter call. Store them in the cursor state
|
||||
// so that SQLite can request each row and column.
|
||||
return this.handleAsync(async () => {
|
||||
@@ -130,14 +130,14 @@ export default abstract class Table implements SQLiteModule {
|
||||
});
|
||||
}
|
||||
|
||||
xNext(pCursor: number): number | Promise<number> {
|
||||
xNext(pCursor: number): number {
|
||||
// Advance the row index for the cursor.
|
||||
const cursorState = this.cursorStates.get(pCursor);
|
||||
cursorState.rowIndex += 1;
|
||||
return SQLite.SQLITE_OK;
|
||||
}
|
||||
|
||||
xEof(pCursor: number): number | Promise<number> {
|
||||
xEof(pCursor: number): number {
|
||||
// Check whether we've returned all rows (cursor index is beyond number of rows).
|
||||
const cursorState = this.cursorStates.get(pCursor);
|
||||
// Throw any error saved in the cursor state (because throwing in xFilter doesn't seem to work
|
||||
@@ -152,7 +152,7 @@ export default abstract class Table implements SQLiteModule {
|
||||
pCursor: number,
|
||||
pContext: number,
|
||||
iCol: number
|
||||
): number | Promise<number> {
|
||||
): number {
|
||||
// Get the generated rows for this cursor.
|
||||
const cursorState = this.cursorStates.get(pCursor);
|
||||
// Get the current row.
|
||||
@@ -167,11 +167,11 @@ export default abstract class Table implements SQLiteModule {
|
||||
|
||||
xRowid(
|
||||
pCursor: number,
|
||||
pRowid: { set: (arg0: number) => void }
|
||||
): number | Promise<number> {
|
||||
pRowid: DataView,
|
||||
): number {
|
||||
// Get the current row index.
|
||||
const cursorState = this.cursorStates.get(pCursor);
|
||||
pRowid.set(cursorState.rowIndex);
|
||||
pRowid.setBigInt64(0, BigInt(cursorState.rowIndex));
|
||||
return SQLite.SQLITE_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='bfleegjcoffelppfmadimianphbcdjkb'>
|
||||
<updatecheck codebase='https://chrome-beta.fleetdm.com/fleetd.crx' version='1.1.1' />
|
||||
<updatecheck codebase='https://chrome-beta.fleetdm.com/fleetd.crx' version='1.1.3' />
|
||||
</app>
|
||||
</gupdate>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='fleeedmmihkfkeemmipgmhhjemlljidg'>
|
||||
<updatecheck codebase='https://chrome.fleetdm.com/fleetd.crx' version='1.1.1' />
|
||||
<updatecheck codebase='https://chrome.fleetdm.com/fleetd.crx' version='1.1.3' />
|
||||
</app>
|
||||
</gupdate>
|
||||
Reference in New Issue
Block a user