Skip to content

Commit 16e2599

Browse files
authored
chore: core update v3.8.3-patch.10 (#177)
1 parent 3d622b4 commit 16e2599

File tree

8 files changed

+34
-5
lines changed

8 files changed

+34
-5
lines changed

assets/openIM.wasm

-816 Bytes
Binary file not shown.

assets/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.8.3-patch.3
1+
v3.8.3-patch.10

assets/wasm_exec.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
if (!globalThis.fs) {
1515
let outputBuf = "";
1616
globalThis.fs = {
17-
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused
17+
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1, O_DIRECTORY: -1 }, // unused
1818
writeSync(fd, buf) {
1919
outputBuf += decoder.decode(buf);
2020
const nl = outputBuf.lastIndexOf("\n");
@@ -73,6 +73,14 @@
7373
}
7474
}
7575

76+
if (!globalThis.path) {
77+
globalThis.path = {
78+
resolve(...pathSegments) {
79+
return pathSegments.join("/");
80+
}
81+
}
82+
}
83+
7684
if (!globalThis.crypto) {
7785
throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");
7886
}
@@ -208,10 +216,16 @@
208216
return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));
209217
}
210218

219+
const testCallExport = (a, b) => {
220+
this._inst.exports.testExport0();
221+
return this._inst.exports.testExport(a, b);
222+
}
223+
211224
const timeOrigin = Date.now() - performance.now();
212225
this.importObject = {
213226
_gotest: {
214227
add: (a, b) => a + b,
228+
callExport: testCallExport,
215229
},
216230
gojs: {
217231
// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openim/wasm-client-sdk",
3-
"version": "3.8.3-patch.9.1",
3+
"version": "3.8.3-patch.10",
44
"description": "open im sdk for web",
55
"source": "src/index.ts",
66
"main": "lib/index.js",

src/api/database/alter.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export function alterTable(db: Database) {
44
alter351(db);
55
alter380(db);
66
alter381(db);
7+
alter383p8(db);
78
}
89

910
function alter351(db: Database) {
@@ -41,3 +42,15 @@ function alter381(db: Database) {
4142
// alter table error
4243
}
4344
}
45+
46+
function alter383p8(db: Database) {
47+
try {
48+
db.exec(
49+
`
50+
ALTER TABLE local_users ADD COLUMN add_friend_permission numeric;
51+
`
52+
);
53+
} catch (error) {
54+
// alter table error
55+
}
56+
}

src/sqls/localUsers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export function localUsers(db: Database): QueryExecResult[] {
1515
'ex' varchar(1024),
1616
'attached_info' varchar(1024),
1717
'global_recv_msg_opt' integer,
18+
'add_friend_permission' integer,
1819
primary key ('user_id')
1920
)
2021
`

src/utils/key.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const InternalConstraint = [
6666
['entity_id', 'entityID'],
6767
['version_id', 'versionID'],
6868
['display_is_read', 'displayIsRead'],
69+
['add_friend_permission', 'addFriendPermission'],
6970
];
7071

7172
function _getInternalCamelCaseBySnakeCase(key: string) {

0 commit comments

Comments
 (0)